forked from RedHatInsights/ros-ocp-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclowdapp.yaml
226 lines (225 loc) · 6.11 KB
/
clowdapp.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
---
apiVersion: v1
kind: Template
metadata:
name: ros-ocp-backend
objects:
- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
name: ros-ocp-backend
spec:
envName: ${ENV_NAME}
dependencies:
- ingress
- rbac
- sources-api
deployments:
- name: processor
replicas: ${{PROCESSOR_REPLICA_COUNT}}
podSpec:
image: ${IMAGE}:${IMAGE_TAG}
command: ["sh"]
args: ["-c", "./rosocp db migrate up && ./rosocp start processor"]
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
livenessProbe:
failureThreshold: 3
httpGet:
path: /metrics
port: 9000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /metrics
port: 9000
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 3
env:
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
- name: KRUIZE_HOST
value: ${KRUIZE_HOST}
- name: KRUIZE_PORT
value: ${KRUIZE_PORT}
- name: KRUIZE_WAIT_TIME
value: ${KRUIZE_WAIT_TIME}
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
- name: SERVICE_NAME
value: "rosocp-processor"
- name: CW_LOG_STREAM_NAME
value: "rosocp-backend"
- name: LOG_LEVEL
value: ${LOG_LEVEL}
- name: api
replicas: ${{API_REPLICA_COUNT}}
webServices:
public:
enabled: true
apiPath: cost-management
podSpec:
image: ${IMAGE}:${IMAGE_TAG}
command: ["sh"]
args: ["-c", "./rosocp db migrate up && ./rosocp start api"]
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
livenessProbe:
failureThreshold: 3
httpGet:
path: /status
port: 8000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /status
port: 8000
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 3
env:
- name: PATH_PREFIX
value: /api
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
- name: RBAC_ENABLE
value: "${RBAC_ENABLE}"
- name: DB_POOL_SIZE
value: ${DB_POOL_SIZE}
- name: DB_MAX_OVERFLOW
value: ${DB_MAX_OVERFLOW}
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
- name: SERVICE_NAME
value: "rosocp-api"
- name: CW_LOG_STREAM_NAME
value: "rosocp-api"
- name: LOG_LEVEL
value: ${LOG_LEVEL}
- name: housekeeper
replicas: ${{HOUSEKEEPER_REPLICA_COUNT}}
podSpec:
image: ${IMAGE}:${IMAGE_TAG}
command: ["sh"]
args: ["-c", "./rosocp db migrate up && ./rosocp start housekeeper"]
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
env:
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
- name: SERVICE_NAME
value: "rosocp-housekeeper"
- name: CW_LOG_STREAM_NAME
value: "rosocp-housekeeper"
- name: LOG_LEVEL
value: ${LOG_LEVEL}
database:
name: rosocp
version: 13
kafkaTopics:
- topicName: hccm.ros.events
partitions: 1
- topicName: rosocp.kruize.experiments
partitions: 1
- topicName: platform.sources.event-stream
partitions: 1
testing:
iqePlugin: ros-ocp
parameters:
- description : ClowdEnvironment name
name: ENV_NAME
required: true
- description: Replica count for processor pod
name: PROCESSOR_REPLICA_COUNT
value: "1"
- description: Image NAME
name: IMAGE
required: true
value: quay.io/cloudservices/ros-ocp-backend
- description: Image tag
name: IMAGE_TAG
required: true
- description: Kruize server host
name: KRUIZE_HOST
required: true
value: "kruize-recommendations"
- description: Kruize server port
name: KRUIZE_PORT
required: true
value: "10000"
- description: Initial cpu request.
displayName: CPU Request
name: CPU_REQUEST
required: true
value: 500m
- description: Initial amount of memory the container will request.
displayName: Memory Request
name: MEMORY_REQUEST
required: true
value: 1Gi
- description: Maximum amount of memory the container can use.
displayName: Memory Limit
name: MEMORY_LIMIT
required: true
value: 1Gi
- description: Maximum amount of CPU the build container can use.
displayName: CPU Limit
name: CPU_LIMIT
required: true
value: '1'
- description: Is clowder enabled
name: CLOWDER_ENABLED
value: "True"
- name: SSL_CERT_DIR
value: '/etc/ssl/certs:/etc/pki/tls/certs:/system/etc/security/cacerts:/cdapp/certs'
- description: Replica count for api pod
name: API_REPLICA_COUNT
value: "1"
- description: Replica count for recommender pod
name: RECOMMENDER_REPLICA_COUNT
value: "1"
- description: Replica count for recommender pod
name: HOUSEKEEPER_REPLICA_COUNT
value: "1"
- description: Time to wait before hitting listRecommendation API
name: KRUIZE_WAIT_TIME
value: "120"
- name: MACHINE_POOL_OPTION
value: ''
- description: Enable the RBAC
name: RBAC_ENABLE
value: "true"
- name: LOG_LEVEL
value: 'INFO'