diff --git a/.gitignore b/.gitignore index 7a6353d..3e26fff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .envrc +/values-dev.yaml diff --git a/helm/ts-activity/Chart.yaml b/helm/ts-activity/Chart.yaml index 07bc879..378029b 100644 --- a/helm/ts-activity/Chart.yaml +++ b/helm/ts-activity/Chart.yaml @@ -5,4 +5,4 @@ description: Post TeamSpeak events to Discord type: application version: "0.0.0" -appVersion: "0.0.0" +appVersion: "v0.0.0" diff --git a/helm/ts-activity/templates/deployment.yaml b/helm/ts-activity/templates/deployment.yaml index 9667033..edfd5fd 100644 --- a/helm/ts-activity/templates/deployment.yaml +++ b/helm/ts-activity/templates/deployment.yaml @@ -5,9 +5,7 @@ metadata: labels: {{- include "ts-activity.labels" . | nindent 4 }} spec: - {{- if not .Values.autoscaling.enabled }} replicas: 1 - {{- end }} selector: matchLabels: {{- include "ts-activity.selectorLabels" . | nindent 6 }} @@ -31,20 +29,28 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}" + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: {{ .Values.service.port }} - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http + env: + - name: TS_DISCORD_USERNAME + value: "{{ .Values.config.discordUsername | default "Jeff" }}" + - name: TS_QUERY_ADDR + value: "{{ .Values.config.serverQueryAddr | required "must provide serverQueryAddr" }}" + - name: TS_QUERY_USER + valueFrom: + secretKeyRef: + key: username + name: "{{ .Values.config.serverQuerySecret | required "must provide serverQuerySecret" }}" + - name: TS_QUERY_PASS + valueFrom: + secretKeyRef: + key: password + name: "{{ .Values.config.serverQuerySecret | required "must provide serverQuerySecret" }}" + - name: TS_DISCORD_WEBHOOK + valueFrom: + secretKeyRef: + key: discord + name: "{{ .Values.config.webhookSecret | required "must provide webhookSecret" }}" resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/helm/ts-activity/values.yaml b/helm/ts-activity/values.yaml index 332054c..20c0371 100644 --- a/helm/ts-activity/values.yaml +++ b/helm/ts-activity/values.yaml @@ -5,9 +5,20 @@ image: repository: aramperes/ts-activity pullPolicy: IfNotPresent - # Overrides the image tag whose default is latest. + # Overrides the image tag whose default is the chart version. tag: "" +config: + # Discord username displayed in webhook messages. + # Defaults to 'Jeff' + discordUsername: "" + # Address to plain ServerQuery. Usually :10011 + serverQueryAddr: "" + # Secret containing 'username' and 'password' for ServerQuery. + serverQuerySecret: "" + # Secret containing 'discord' with the Webhook URL. + webhookSecret: "" + imagePullSecrets: [] nameOverride: "" fullnameOverride: ""