Skip to content

Commit

Permalink
fix: Add expired env checker job (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 authored Oct 31, 2024
1 parent 015f6c4 commit 954648d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/ctrlplane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: ctrlplane
description: Ctrlplane Helm chart for Kubernetes
type: application
version: 0.2.6
version: 0.2.7
appVersion: "1.16.0"

maintainers:
Expand Down
46 changes: 46 additions & 0 deletions charts/ctrlplane/charts/jobs/templates/expired-env-checker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "jobs.fullname" . }}-expired-env-checker
labels:
{{- if .Values.cron.labels -}}
{{- toYaml .Values.cron.labels | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.cron.annotations -}}
{{- toYaml .Values.cron.annotations | nindent 4 }}
{{- end }}
spec:
concurrencyPolicy: {{ .Values.cron.concurrencyPolicy }}
schedule: {{ .Values.cron.schedule | quote }}
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: expired-env-checker
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["node"]
args: ["index.js", "-r", "-j expired-env-checker"]
env:
- name: REDIS_URL
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-connections
key: REDIS_URL
- name: POSTGRES_URL
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-connections
key: POSTGRES_URL
- name: VARIABLES_AES_256_KEY
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-encryption-key
key: AES_256_KEY
{{- include "ctrlplane.extraEnv" . | nindent 16 }}
{{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 16 }}
resources:
{{- toYaml .Values.resources | nindent 16 }}

0 comments on commit 954648d

Please sign in to comment.