Skip to content

Commit

Permalink
Add faf-db-migrations cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Feb 9, 2025
1 parent 983cff3 commit 401ecfe
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/faf-db-migrations/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: faf-db-migrations
version: 1.0.0
33 changes: 33 additions & 0 deletions apps/faf-db-migrations/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
kind: CronJob
apiVersion: batch/v1
metadata:
name: faf-db-migrations
namespace: faf-apps
labels:
app: faf-db-migrations
spec:
# Disabled because triggered manually
schedule: "0 0 31 2 *"
suspend: true
concurrencyPolicy: Forbid
jobTemplate:
metadata:
labels:
app: faf-db-migrations
annotations:
prometheus.io/scrape: 'false'
spec:
template:
spec:
containers:
- image: faforever/faf-db-migrations:v133
imagePullPolicy: Always
name: faf-db-migrations
env:
- name: FLYWAY_URL
value: "jdbc:mariadb://mariadb:3306/faf_lobby?ssl=false"
envFrom:
- secretRef:
name: faf-db-migrations
args: [ "migrate" ]
restartPolicy: Never
19 changes: 19 additions & 0 deletions apps/faf-db-migrations/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
metadata:
name: faf-db-migrations
namespace: faf-apps
spec:
authentication:
universalAuth:
credentialsRef:
secretName: infisical-machine-identity
secretNamespace: faf-ops
secretsScope:
projectSlug: {{.Values.infisical.projectSlug}}
envSlug: {{.Values.infisical.envSlug}}
secretsPath: "/faf-db-migrations"
managedSecretReference:
secretName: faf-db-migrations
secretNamespace: faf-apps
creationPolicy: "Owner"

0 comments on commit 401ecfe

Please sign in to comment.