add Cron cicd+helm
This commit is contained in:
parent
6900888fd8
commit
75b4b629e2
@ -32,3 +32,23 @@ lecoffreBack:
|
||||
- key: .env
|
||||
scwID: "id:a131edea-84e0-49d6-b4a8-20ab417220c9"
|
||||
|
||||
lecoffreCron:
|
||||
serviceAccountName: lecoffre-cron-sa
|
||||
envSecrets: stg-env
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run api:start'"
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
image:
|
||||
pullPolicy: Always
|
||||
repository: "rg.fr-par.scw.cloud/lecoffre/back"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
memory: 2Gi
|
||||
# key is name of the environment variable, scwID is the secret ID in SCW with "id:" in front
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:2be9510b-bb1f-4fbe-ab3e-3dc11fb49051"
|
||||
|
||||
|
@ -31,4 +31,24 @@ lecoffreBack:
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:a131edea-84e0-49d6-b4a8-20ab417220c9"
|
||||
|
||||
lecoffreCron:
|
||||
serviceAccountName: lecoffre-cron-sa
|
||||
envSecrets: stg-env
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run api:start'"
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
image:
|
||||
pullPolicy: Always
|
||||
repository: "rg.fr-par.scw.cloud/lecoffre/back"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
memory: 2Gi
|
||||
# key is name of the environment variable, scwID is the secret ID in SCW with "id:" in front
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:2be9510b-bb1f-4fbe-ab3e-3dc11fb49051"
|
||||
|
||||
|
@ -33,4 +33,24 @@ lecoffreBack:
|
||||
- key: .env
|
||||
scwID: "id:2be9510b-bb1f-4fbe-ab3e-3dc11fb49051"
|
||||
|
||||
lecoffreCron:
|
||||
serviceAccountName: lecoffre-cron-sa
|
||||
envSecrets: stg-env
|
||||
command: "'sh', '-c', 'export $(xargs </etc/env/.env) && npm run api:start'"
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
image:
|
||||
pullPolicy: Always
|
||||
repository: "rg.fr-par.scw.cloud/lecoffre/back"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
memory: 1Gi
|
||||
limits:
|
||||
memory: 2Gi
|
||||
# key is name of the environment variable, scwID is the secret ID in SCW with "id:" in front
|
||||
env:
|
||||
- key: .env
|
||||
scwID: "id:2be9510b-bb1f-4fbe-ab3e-3dc11fb49051"
|
||||
|
||||
|
||||
|
37
devops/templates/lecoffre-cron.yaml
Normal file
37
devops/templates/lecoffre-cron.yaml
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lecoffre-cron
|
||||
labels:
|
||||
app: lecoffre-cron
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lecoffre-cron
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: lecoffre-cron
|
||||
spec:
|
||||
serviceAccountName: {{ .Values.lecoffreCron.serviceAccountName }}
|
||||
imagePullSecrets:
|
||||
- name: docker-pull-secret
|
||||
containers:
|
||||
- name: lecoffre-cron
|
||||
image: "{{ .Values.lecoffreCron.image.repository }}:{{ .Values.lecoffreCron.image.tag }}"
|
||||
{{if .Values.lecoffreCron.resources}}
|
||||
resources:
|
||||
{{toYaml .Values.lecoffreCron.resources | indent 10}}
|
||||
{{end}}
|
||||
imagePullPolicy: {{ .Values.lecoffreCron.image.pullPolicy }}
|
||||
command: [{{ .Values.lecoffreCron.command }}]
|
||||
volumeMounts:
|
||||
- name: secret-volume
|
||||
mountPath: /etc/env
|
||||
volumes:
|
||||
- name: secret-volume
|
||||
secret:
|
||||
secretName: {{ .Values.lecoffreCron.envSecrets }}
|
Loading…
x
Reference in New Issue
Block a user