145 lines
5.4 KiB
YAML
145 lines
5.4 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: postiz-temporal-schema-1-1-1-1
|
|
labels:
|
|
app.kubernetes.io/component: database
|
|
app.kubernetes.io/name: temporal
|
|
helm.sh/chart: temporal-1.1.1
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/instance: postiz
|
|
app.kubernetes.io/version: "1.30.3"
|
|
app.kubernetes.io/part-of: temporal
|
|
annotations:
|
|
"helm.sh/hook": pre-install,pre-upgrade
|
|
"helm.sh/hook-weight": "0"
|
|
"helm.sh/hook-delete-policy": before-hook-creation
|
|
spec:
|
|
backoffLimit: 100
|
|
ttlSecondsAfterFinished: 86400
|
|
template:
|
|
metadata:
|
|
name: postiz-temporal-schema-1-1-1-1
|
|
labels:
|
|
app.kubernetes.io/component: database
|
|
app.kubernetes.io/name: temporal
|
|
helm.sh/chart: temporal-1.1.1
|
|
app.kubernetes.io/managed-by: Helm
|
|
app.kubernetes.io/instance: postiz
|
|
app.kubernetes.io/version: "1.30.3"
|
|
app.kubernetes.io/part-of: temporal
|
|
spec:
|
|
serviceAccountName: default
|
|
restartPolicy: OnFailure
|
|
initContainers:
|
|
- name: create-default-store
|
|
image: "temporalio/admin-tools:1.30.4@sha256:9ac15d500f4020f7cc694ecc17085dfcfc2d4b1d0d2020dbe83b6f3d49e156e0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ['temporal-sql-tool', 'create-database']
|
|
env:
|
|
- name: SQL_PLUGIN
|
|
value: postgres12
|
|
- name: SQL_HOST
|
|
value: postiz-postgresql-18-cluster-rw.postiz
|
|
- name: SQL_PORT
|
|
value: "5432"
|
|
- name: SQL_DATABASE
|
|
value: temporal
|
|
- name: SQL_USER
|
|
value: "postgres"
|
|
- name: SQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postiz-postgresql-18-cluster-superuser
|
|
key: password
|
|
- name: SQL_TLS
|
|
value: "false"
|
|
- name: manage-schema-default-store
|
|
image: "temporalio/admin-tools:1.30.4@sha256:9ac15d500f4020f7cc694ecc17085dfcfc2d4b1d0d2020dbe83b6f3d49e156e0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ['sh', '-c']
|
|
args:
|
|
- temporal-sql-tool setup-schema -v 0.0 && temporal-sql-tool update-schema --schema-dir /etc/temporal/schema/postgresql/v12/temporal/versioned
|
|
env:
|
|
- name: SQL_PLUGIN
|
|
value: postgres12
|
|
- name: SQL_HOST
|
|
value: postiz-postgresql-18-cluster-rw.postiz
|
|
- name: SQL_PORT
|
|
value: "5432"
|
|
- name: SQL_DATABASE
|
|
value: temporal
|
|
- name: SQL_USER
|
|
value: "postgres"
|
|
- name: SQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postiz-postgresql-18-cluster-superuser
|
|
key: password
|
|
- name: SQL_TLS
|
|
value: "false"
|
|
volumeMounts:
|
|
- name: shims
|
|
mountPath: /usr/local/sbin/temporal-elasticsearch-tool
|
|
subPath: temporal-elasticsearch-tool
|
|
- name: create-visibility-store
|
|
image: "temporalio/admin-tools:1.30.4@sha256:9ac15d500f4020f7cc694ecc17085dfcfc2d4b1d0d2020dbe83b6f3d49e156e0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ['temporal-sql-tool', 'create-database']
|
|
env:
|
|
- name: SQL_PLUGIN
|
|
value: postgres12
|
|
- name: SQL_HOST
|
|
value: postiz-postgresql-18-cluster-rw.postiz
|
|
- name: SQL_PORT
|
|
value: "5432"
|
|
- name: SQL_DATABASE
|
|
value: temporal_visibility
|
|
- name: SQL_USER
|
|
value: "postgres"
|
|
- name: SQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postiz-postgresql-18-cluster-superuser
|
|
key: password
|
|
- name: SQL_TLS
|
|
value: "false"
|
|
- name: manage-schema-visibility-store
|
|
image: "temporalio/admin-tools:1.30.4@sha256:9ac15d500f4020f7cc694ecc17085dfcfc2d4b1d0d2020dbe83b6f3d49e156e0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ['sh', '-c']
|
|
args:
|
|
- temporal-sql-tool setup-schema -v 0.0 && temporal-sql-tool update-schema --schema-dir /etc/temporal/schema/postgresql/v12/visibility/versioned
|
|
env:
|
|
- name: SQL_PLUGIN
|
|
value: postgres12
|
|
- name: SQL_HOST
|
|
value: postiz-postgresql-18-cluster-rw.postiz
|
|
- name: SQL_PORT
|
|
value: "5432"
|
|
- name: SQL_DATABASE
|
|
value: temporal_visibility
|
|
- name: SQL_USER
|
|
value: "postgres"
|
|
- name: SQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postiz-postgresql-18-cluster-superuser
|
|
key: password
|
|
- name: SQL_TLS
|
|
value: "false"
|
|
volumeMounts:
|
|
- name: shims
|
|
mountPath: /usr/local/sbin/temporal-elasticsearch-tool
|
|
subPath: temporal-elasticsearch-tool
|
|
containers:
|
|
- name: done
|
|
image: "temporalio/admin-tools:1.30.4@sha256:9ac15d500f4020f7cc694ecc17085dfcfc2d4b1d0d2020dbe83b6f3d49e156e0"
|
|
imagePullPolicy: IfNotPresent
|
|
command: ['sh', '-c', 'echo "Store setup completed"']
|
|
volumes:
|
|
- name: shims
|
|
configMap:
|
|
name: "postiz-temporal-shims"
|
|
defaultMode: 0555
|