Skip to content

Commit 954648d

Browse files
fix: Add expired env checker job (#13)
1 parent 015f6c4 commit 954648d

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

charts/ctrlplane/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: ctrlplane
33
description: Ctrlplane Helm chart for Kubernetes
44
type: application
5-
version: 0.2.6
5+
version: 0.2.7
66
appVersion: "1.16.0"
77

88
maintainers:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: batch/v1
2+
kind: CronJob
3+
metadata:
4+
name: {{ include "jobs.fullname" . }}-expired-env-checker
5+
labels:
6+
{{- if .Values.cron.labels -}}
7+
{{- toYaml .Values.cron.labels | nindent 4 }}
8+
{{- end }}
9+
annotations:
10+
{{- if .Values.cron.annotations -}}
11+
{{- toYaml .Values.cron.annotations | nindent 4 }}
12+
{{- end }}
13+
spec:
14+
concurrencyPolicy: {{ .Values.cron.concurrencyPolicy }}
15+
schedule: {{ .Values.cron.schedule | quote }}
16+
jobTemplate:
17+
spec:
18+
template:
19+
spec:
20+
restartPolicy: OnFailure
21+
containers:
22+
- name: expired-env-checker
23+
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
24+
imagePullPolicy: {{ .Values.image.pullPolicy }}
25+
command: ["node"]
26+
args: ["index.js", "-r", "-j expired-env-checker"]
27+
env:
28+
- name: REDIS_URL
29+
valueFrom:
30+
secretKeyRef:
31+
name: {{ .Release.Name }}-connections
32+
key: REDIS_URL
33+
- name: POSTGRES_URL
34+
valueFrom:
35+
secretKeyRef:
36+
name: {{ .Release.Name }}-connections
37+
key: POSTGRES_URL
38+
- name: VARIABLES_AES_256_KEY
39+
valueFrom:
40+
secretKeyRef:
41+
name: {{ .Release.Name }}-encryption-key
42+
key: AES_256_KEY
43+
{{- include "ctrlplane.extraEnv" . | nindent 16 }}
44+
{{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 16 }}
45+
resources:
46+
{{- toYaml .Values.resources | nindent 16 }}

0 commit comments

Comments
 (0)