Skip to content

Commit

Permalink
fix cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcoz committed Apr 13, 2023
1 parent 1521f63 commit c69f868
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 15 additions & 3 deletions helm/chart/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
serviceAccountName: {{ include "bikelib.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 12 }}
restartPolicy: Never
containers:
- name: {{ .Chart.Name }}-cronjob
image: "{{ .Values.php.image.repository }}:{{ .Values.php.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.php.image.pullPolicy }}
command: ['/bin/sh', '-c']
args: ['composer install --prefer-dist --no-progress --no-suggest --no-interaction && bin/console doctrine:schema:drop --force --no-interaction && bin/console doctrine:migrations:version --delete --all --no-interaction && bin/console doctrine:migrations:migrate --no-interaction && bin/console hautelook:fixtures:load --no-interaction']
args: ['
set -ex;
bin/console doctrine:schema:drop --full-database --force;
bin/console doctrine:migrations:migrate --no-interaction;
']
env:
- name: API_ENTRYPOINT_HOST
valueFrom:
Expand Down Expand Up @@ -60,9 +66,15 @@ spec:
name: {{ include "bikelib.fullname" . }}
key: php-trusted-proxies
- name: APP_ENV
value: "dev"
valueFrom:
configMapKeyRef:
name: {{ include "bikelib.fullname" . }}
key: php-app-env
- name: APP_DEBUG
value: "1"
valueFrom:
configMapKeyRef:
name: {{ include "bikelib.fullname" . }}
key: php-app-debug
- name: APP_SECRET
valueFrom:
secretKeyRef:
Expand Down
3 changes: 2 additions & 1 deletion helm/chart/test_minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ helm upgrade --install demo ./helm/chart \
-f ./helm/chart/values-minikube.yml \
--set php.image.tag=$php_sha \
--set caddy.image.tag=$caddy_sha \
--set pwa.image.tag=$pwa_sha
--set pwa.image.tag=$pwa_sha \
--set dailyCronjobDbReset.enabled=true

MINIKUBE_IP=$(minikube ip)
if ! grep -E "^$MINIKUBE_IP\s+(.+\s+)?bikelib.chart-example.local" /etc/hosts; then
Expand Down

0 comments on commit c69f868

Please sign in to comment.