apiVersion: batch/v1 kind: Job metadata: name: application-metier-migrate namespace: application-metier labels: app.kubernetes.io/name: application-metier app.kubernetes.io/component: migration spec: backoffLimit: 2 ttlSecondsAfterFinished: 86400 template: metadata: labels: app.kubernetes.io/name: application-metier app.kubernetes.io/component: migration spec: restartPolicy: Never automountServiceAccountToken: false securityContext: runAsNonRoot: true runAsUser: 65532 runAsGroup: 65532 seccompProfile: type: RuntimeDefault containers: - name: goose image: git.guillin.ovh/baptiste/application-metier/api@sha256:4b38014a96731a2999f6ce41923ee43890c718fae53447537a500bd7f55afaa6 imagePullPolicy: IfNotPresent command: ["/app/goose"] args: ["up"] env: - name: GOOSE_DRIVER value: postgres - name: GOOSE_MIGRATION_DIR value: /app/migrations - name: GOOSE_DBSTRING valueFrom: secretKeyRef: name: application-metier-secrets key: DATABASE_URL - name: NO_COLOR value: "1" resources: requests: cpu: 25m memory: 32Mi limits: cpu: 250m memory: 128Mi securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: ["ALL"]