Skip to content

Commit

Permalink
update helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Feb 7, 2025
1 parent 0bdec34 commit c878dd5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
2 changes: 1 addition & 1 deletion charts/laravel/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.2.5
version: 0.2.6

# 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
57 changes: 31 additions & 26 deletions charts/laravel/templates/cron.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
apiVersion: batch/v1
kind: CronJob
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "laravel.fullname" . }}-cron
name: {{ include "laravel.fullname" . }}-scheduler
labels:
app: {{ include "laravel.fullname" . }}-scheduler
{{- include "laravel.labels" . | nindent 4 }}
annotations:
secrets.infisical.com/auto-reload: "true"
spec:
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
schedule: "* * * * *"
concurrencyPolicy: Forbid
jobTemplate:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: {{ include "laravel.fullname" . }}-scheduler
template:
metadata:
name: {{ include "laravel.fullname" . }}-scheduler
labels:
app: {{ include "laravel.fullname" . }}-scheduler
spec:
ttlSecondsAfterFinished: 300
activeDeadlineSeconds: 75
template:
spec:
restartPolicy: "OnFailure"
containers:
- name: cron
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.cron.resources | nindent 16 }}
command:
- php
- artisan
- schedule:run
envFrom:
- secretRef:
name: {{ include "laravel.managedSecretReferenceSecretName" . }}
restartPolicy: Always
containers:
- name: scheduler
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- php
- artisan
- schedule:work
envFrom:
- secretRef:
name: {{ include "laravel.managedSecretReferenceSecretName" . }}
resources:
{{- toYaml .Values.app.resources | nindent 12 }}

0 comments on commit c878dd5

Please sign in to comment.