Add configs to Helm chart

This commit is contained in:
Aram 🍐 2023-07-21 23:24:55 -04:00
parent 976b8dc0a9
commit 71618fc8c3
4 changed files with 35 additions and 17 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.envrc
/values-dev.yaml

View file

@ -5,4 +5,4 @@ description: Post TeamSpeak events to Discord
type: application
version: "0.0.0"
appVersion: "0.0.0"
appVersion: "v0.0.0"

View file

@ -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 }}

View file

@ -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 <ts_host>:10011
serverQueryAddr: ""
# Secret containing 'username' and 'password' for ServerQuery.
serverQuerySecret: ""
# Secret containing 'discord' with the Webhook URL.
webhookSecret: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""