53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
apiVersion: batch/v1
|
|||
|
|
kind: Job
|
||
|
|
metadata:
|
||
|
|
name: voice-platform-migrate
|
||
|
|
namespace: voice-platform
|
||
|
|
labels:
|
||
|
|
app.kubernetes.io/name: voice-platform-migrate
|
||
|
|
app.kubernetes.io/part-of: voice-platform
|
||
|
|
spec:
|
||
|
|
backoffLimit: 2
|
||
|
|
activeDeadlineSeconds: 600
|
||
|
|
ttlSecondsAfterFinished: 600
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app.kubernetes.io/name: voice-platform-migrate
|
||
|
|
app.kubernetes.io/part-of: voice-platform
|
||
|
|
spec:
|
||
|
|
restartPolicy: Never
|
||
|
|
automountServiceAccountToken: false
|
||
|
|
securityContext:
|
||
|
|
runAsNonRoot: true
|
||
|
|
runAsUser: 65532
|
||
|
|
runAsGroup: 65532
|
||
|
|
seccompProfile:
|
||
|
|
type: RuntimeDefault
|
||
|
|
containers:
|
||
|
|
- name: migrate
|
||
|
|
image: registry.example.invalid/voice-platform/migrate:0.1.0
|
||
|
|
imagePullPolicy: IfNotPresent
|
||
|
|
args:
|
||
|
|
- -path=/migrations
|
||
|
|
- -database=$(DATABASE_URL)
|
||
|
|
- up
|
||
|
|
env:
|
||
|
|
- name: DATABASE_URL
|
||
|
|
valueFrom:
|
||
|
|
secretKeyRef:
|
||
|
|
name: voice-platform-common-secrets
|
||
|
|
key: database-url
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
cpu: 50m
|
||
|
|
memory: 64Mi
|
||
|
|
limits:
|
||
|
|
cpu: 250m
|
||
|
|
memory: 192Mi
|
||
|
|
securityContext:
|
||
|
|
allowPrivilegeEscalation: false
|
||
|
|
readOnlyRootFilesystem: true
|
||
|
|
capabilities:
|
||
|
|
drop: ["ALL"]
|