Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/noncer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.3
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
25 changes: 22 additions & 3 deletions charts/noncer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,34 @@ spec:
- -port
- "{{ .Values.email.port }}"
- -pass
- "{{ .Values.email.password }}"
- "$(PASSWORD)"
- -period
- "{{ .Values.bot.period }}"
- -webhook
- "{{ .Values.bot.webhook }}"
- "$(WEBHOOK)"
{{- range .Values.bot.allowList}}
- -allowlist
- "{{ . }}"
{{- end }}
{{- end }}
env:
- name: PASSWORD
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: "{{ .Values.existingSecret }}"
{{- else }}
name: "{{ include "noncer.name" . }}"
{{- end }}
key: password
- name: WEBHOOK
valueFrom:
secretKeyRef:
{{- if .Values.existingSecret }}
name: "{{ .Values.existingSecret }}"
{{- else }}
name: "{{ include "noncer.name" . }}"
{{- end }}
key: webhook
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
10 changes: 10 additions & 0 deletions charts/noncer/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if not .Values.existingSecret -}}
apiVersion: v1
kind: Secret
metadata:
name: "{{ include "noncer.name" . }}"
type: Opaque
data:
password: {{ .Values.email.password | required ".Values.email.password is required." | b64enc }}
webhook: {{ .Values.bot.webhook | required ".Values.bot.webhook is required" | b64enc }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/noncer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ image:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

# The bot can be provided with an existing secret that contains both the password and the webhook.
# Otherwise a secret will be created
existingSecret: ""

email:
user: ""
password: ""
Expand Down