47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: meguri-migrate-RELEASE
|
|
spec:
|
|
backoffLimit: 0
|
|
activeDeadlineSeconds: 300
|
|
ttlSecondsAfterFinished: 86400
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
serviceAccountName: meguri
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
seccompProfile: {type: RuntimeDefault}
|
|
initContainers:
|
|
- name: cloud-sql-proxy
|
|
restartPolicy: Always
|
|
image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.14.1
|
|
args: ["--private-ip", "--structured-logs", "--port=5432", "--health-check", "--http-address=0.0.0.0", "--http-port=9090", "PROJECT_ID:REGION:INSTANCE"]
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities: {drop: [ALL]}
|
|
resources:
|
|
requests: {cpu: 100m, memory: 128Mi}
|
|
limits: {memory: 256Mi}
|
|
startupProbe:
|
|
httpGet: {path: /startup, port: 9090}
|
|
periodSeconds: 2
|
|
failureThreshold: 30
|
|
containers:
|
|
- name: migrate
|
|
image: REGION-docker.pkg.dev/PROJECT_ID/REPOSITORY/meguri:RELEASE
|
|
envFrom:
|
|
- configMapRef: {name: meguri-config}
|
|
- secretRef: {name: meguri-secrets}
|
|
env:
|
|
- {name: MEGURI_ROLE, value: migrate}
|
|
- {name: MEGURI_SKIP_MIGRATIONS, value: "false"}
|
|
securityContext:
|
|
readOnlyRootFilesystem: true
|
|
allowPrivilegeEscalation: false
|
|
capabilities: {drop: [ALL]}
|
|
resources:
|
|
requests: {cpu: 250m, memory: 128Mi}
|
|
limits: {memory: 256Mi}
|