Files
infrastructure/clusters/cl01tl/manifests/postiz/Job-postiz-temporal-schema-1-0-0-1.yaml

149 lines
5.7 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: postiz-temporal-schema-1-0-0-1
labels:
app.kubernetes.io/component: database
app.kubernetes.io/name: temporal
helm.sh/chart: temporal-1.0.0
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:
backoffLimit: 100
ttlSecondsAfterFinished: 86400
template:
metadata:
name: postiz-temporal-schema-1-0-0-1
labels:
app.kubernetes.io/component: database
app.kubernetes.io/name: temporal
helm.sh/chart: temporal-1.0.0
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.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
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.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
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.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
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.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
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
- name: create-default-namespace
image: "temporalio/admin-tools:1.30.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
imagePullPolicy: IfNotPresent
command: ['/bin/sh', '-c']
args: ['temporal operator namespace describe -n default || temporal operator namespace create -n default --retention 30d']
env:
- name: TEMPORAL_ADDRESS
value: "postiz-temporal-frontend.postiz.svc:7233"
containers:
- name: done
image: "temporalio/admin-tools:1.30.3@sha256:2c2272b008f1af295b3719963e6feeef64f838d1105d895cf6acfcf96dd31741"
imagePullPolicy: IfNotPresent
command: ['sh', '-c', 'echo "Store setup completed"']
volumes:
- name: shims
configMap:
name: "postiz-temporal-shims"
defaultMode: 0555