forked from RedHatInsights/ros-ocp-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkruize-clowdapp.yaml
193 lines (191 loc) · 5.76 KB
/
kruize-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
---
apiVersion: v1
kind: Template
metadata:
name: kruize
objects:
- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
name: kruize
spec:
envName: ${ENV_NAME}
deployments:
- name: recommendations
replicas: ${{KRUIZE_REPLICA_COUNT}}
webServices:
private:
enabled: true
podSpec:
image: ${KRUIZE_IMAGE}:${KRUIZE_IMAGE_TAG}
command: ["sh"]
args: ["-c", "export DB_CONFIG_FILE=${ACG_CONFIG} && bash target/bin/Autotune"]
machinePool: ${MACHINE_POOL_OPTION}
resources:
requests:
cpu: ${KRUIZE_CPU_REQUEST}
memory: ${KRUIZE_MEMORY_REQUEST}
limits:
cpu: ${KRUIZE_CPU_LIMIT}
memory: ${KRUIZE_MEMORY_LIMIT}
env:
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
- name: AUTOTUNE_SERVER_PORT
value: ${KRUIZE_PORT}
- name: AUTH_TOKEN
value: ""
- name: LOGGING_LEVEL
value: ${KRUIZE_LOGGING_LEVEL}
- name: ROOT_LOGGING_LEVEL
value: "error"
- name: dbdriver
value: "jdbc:postgresql://"
- name: clustertype
value: "kubernetes"
- name: k8stype
value: "openshift"
- name: authtype
value: "openshift"
- name: monitoringagent
value: "prometheus"
- name: monitoringservice
value: "prometheus-k8s"
- name: monitoringendpoint
value: "prometheus-k8s"
- name: savetodb
value: "true"
- name: hibernate_dialect
value: "org.hibernate.dialect.PostgreSQLDialect"
- name: hibernate_driver
value: "org.postgresql.Driver"
- name: hibernate_c3p0minsize
value: "5"
- name: hibernate_c3p0maxsize
value: "10"
- name: hibernate_c3p0timeout
value: "300"
- name: hibernate_c3p0maxstatements
value: "100"
- name: hibernate_hbm2ddlauto
value: "none"
- name: hibernate_showsql
value: "false"
- name: hibernate_timezone
value: "UTC"
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
jobs:
- name: create-kruize-partitions
schedule: "0 0 25 * *" # Run on 25th of every month at midnight
podSpec:
name: kruizecronjob
image: ${KRUIZE_IMAGE}:${KRUIZE_IMAGE_TAG}
imagePullPolicy: Always
restartPolicy: OnFailure
command: ["sh"]
args: ["-c", "export DB_CONFIG_FILE=${ACG_CONFIG} && /home/autotune/app/target/bin/CreatePartition"]
env:
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
- name: START_AUTOTUNE
value: "false"
- name: LOGGING_LEVEL
value: "info"
- name: ROOT_LOGGING_LEVEL
value: "error"
- name: dbdriver
value: "jdbc:postgresql://"
- name: clustertype
value: "kubernetes"
- name: k8stype
value: "openshift"
- name: authtype
value: "openshift"
- name: monitoringagent
value: "prometheus"
- name: monitoringservice
value: "prometheus-k8s"
- name: monitoringendpoint
value: "prometheus-k8s"
- name: savetodb
value: "true"
- name: hibernate_dialect
value: "org.hibernate.dialect.PostgreSQLDialect"
- name: hibernate_driver
value: "org.postgresql.Driver"
- name: hibernate_c3p0minsize
value: "5"
- name: hibernate_c3p0maxsize
value: "10"
- name: hibernate_c3p0timeout
value: "300"
- name: hibernate_c3p0maxstatements
value: "100"
- name: hibernate_hbm2ddlauto
value: "none"
- name: hibernate_showsql
value: "false"
- name: hibernate_timezone
value: "UTC"
database:
name: postgres
version: 13
- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdJobInvocation
metadata:
name: create-kruize-partitions
spec:
appName: kruize
jobs:
- create-kruize-partitions
parameters:
- description : ClowdEnvironment name
name: ENV_NAME
required: true
- description: Is clowder enabled
name: CLOWDER_ENABLED
value: "True"
- description: Kruize image name
name: KRUIZE_IMAGE
required: true
value: quay.io/cloudservices/autotune
- description: Kruize image tag
name: KRUIZE_IMAGE_TAG
required: true
value: "6c23945"
- description: Kruize server port
name: KRUIZE_PORT
required: true
value: "10000"
- description: Initial kruize cpu request.
displayName: KRUIZE CPU Request
name: KRUIZE_CPU_REQUEST
required: true
value: 500m
- description: Initial amount of memory kruize container will request.
displayName: KRUIZE Memory Request
name: KRUIZE_MEMORY_REQUEST
required: true
value: 1Gi
- description: Maximum amount of CPU kruize container can use.
displayName: KRUIZE CPU Limit
name: KRUIZE_CPU_LIMIT
required: true
value: '1'
- description: Maximum amount of memory kruize container can use.
displayName: KRUIZE Memory Limit
name: KRUIZE_MEMORY_LIMIT
required: true
value: 1Gi
- description: Replica count for kruize pod
name: KRUIZE_REPLICA_COUNT
value: "1"
- name: MACHINE_POOL_OPTION
value: ''
- name: SSL_CERT_DIR
value: '/etc/ssl/certs:/etc/pki/tls/certs:/system/etc/security/cacerts:/cdapp/certs'
- name: KRUIZE_LOGGING_LEVEL
value: "info"