generated from thoth-station/template-project
-
Notifications
You must be signed in to change notification settings - Fork 8
/
openshift.yaml
161 lines (154 loc) · 4.95 KB
/
openshift.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
apiVersion: v1
kind: Template
metadata:
name: sync
annotations:
description: "Thoth: Sync Job"
openshift.io/display-name: "Thoth: Sync Job"
version: 0.1.0
tags: thoth,ai-stacks,sync,knowledge-graph
template.openshift.io/documentation-url: https://github.com/Thoth-Station/
template.openshift.io/long-description: >
This template defines resources needed to run Thoth's syncing logic.
template.openshift.io/provider-display-name: "Red Hat, Inc."
thoth-station.ninja/template-version: 0.1.0
labels:
app: thoth
template: sync
component: sync
parameters:
- name: IMAGE_VERSION
required: true
displayName: Image version
description: Version of image to be used to run the job.
value: "latest"
- name: THOTH_SYNC_FORCE
required: true
displayName: Force sync
description: Perform force sync.
value: "0"
- name: THOTH_SYNC_GRACEFUL
required: true
displayName: Skip sync errors
description: Skip any errors during the sync.
value: "0"
- name: THOTH_SYNC_DEBUG
required: true
displayName: Debug
description: Run the syncing logic in debug mode.
value: "0"
- name: THOTH_SYNC_IDENTIFIER
required: true
displayName: Identifier
description: Job identifier
generate: expression
from: "[a-z0-9]{6}"
- name: THOTH_DOCUMENT_TYPE
required: false
displayName: document type to be synced
description: Document Type identifier
objects:
- apiVersion: batch/v1
kind: Job
metadata:
name: "sync-${THOTH_SYNC_IDENTIFIER}"
annotations:
thoth-station.ninja/template-version: 0.1.0
labels:
app: thoth
component: sync
spec:
backoffLimit: 0
template:
metadata:
labels:
app: thoth
component: sync
spec:
restartPolicy: Never
automountServiceAccountToken: false
containers:
- name: sync
image: "quay.io/thoth-station/sync-job:${IMAGE_VERSION}"
env:
- name: THOTH_LOG_SYNC
value: "INFO"
- name: THOTH_SYNC_FORCE
value: "${THOTH_SYNC_FORCE}"
- name: THOTH_SYNC_GRACEFUL
value: "${THOTH_SYNC_GRACEFUL}"
- name: THOTH_SYNC_DEBUG
value: "${THOTH_SYNC_DEBUG}"
- name: THOTH_DOCUMENT_TYPE
value: "${THOTH_DOCUMENT_TYPE}"
- name: THOTH_DEPLOYMENT_NAME
valueFrom:
configMapKeyRef:
key: deployment-name
name: thoth
- name: THOTH_S3_ENDPOINT_URL
valueFrom:
configMapKeyRef:
key: host
name: ceph
- name: THOTH_CEPH_BUCKET
valueFrom:
configMapKeyRef:
key: bucket-name
name: ceph
- name: THOTH_CEPH_BUCKET_PREFIX
valueFrom:
configMapKeyRef:
key: bucket-prefix
name: ceph
- name: THOTH_DEPLOYMENT_NAME
valueFrom:
configMapKeyRef:
key: storage-bucket-name
name: thoth
- name: THOTH_CEPH_KEY_ID
valueFrom:
secretKeyRef:
name: ceph
key: key-id
- name: THOTH_CEPH_SECRET_KEY
valueFrom:
secretKeyRef:
name: ceph
key: secret-key
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: thoth
key: sentry-dsn
- name: KNOWLEDGE_GRAPH_HOST
valueFrom:
configMapKeyRef:
key: postgresql-host
name: thoth
- name: KNOWLEDGE_GRAPH_PORT
value: "5432"
- name: KNOWLEDGE_GRAPH_SSL_DISABLED
value: "1"
- name: KNOWLEDGE_GRAPH_USER
valueFrom:
secretKeyRef:
name: postgresql
key: database-user
- name: KNOWLEDGE_GRAPH_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql
key: database-password
- name: KNOWLEDGE_GRAPH_DATABASE
valueFrom:
secretKeyRef:
name: postgresql
key: database-name
resources:
limits:
memory: "2Gi"
cpu: 4
requests:
memory: "2Gi"
cpu: 4