forked from RedHatInsights/ros-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clowdapp.yaml
123 lines (122 loc) · 3.06 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
---
apiVersion: v1
kind: Template
metadata:
name: ros
objects:
- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
name: ros
spec:
envName: ${ENV_NAME}
dependencies:
- rbac
deployments:
- name: backend
webServices:
public:
enabled: true
podSpec:
image: ${IMAGE}:${IMAGE_TAG}
minReplicas: 1
command: ["sh"]
args: ["-c", "python -m manage db upgrade && python -m ros.api.main"]
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
livenessProbe:
failureThreshold: 3
httpGet:
path: /api/ros/v0/status
port: 8000
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /api/ros/v0/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: ENABLE_RBAC
value: "${ENABLE_RBAC}"
- name: processor
podSpec:
image: ${IMAGE}:${IMAGE_TAG}
minReplicas: ${{MIN_REPLICAS}}
command: ["bash"]
args: ["-c", "python -m ros.processor.main"]
resources:
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
limits:
cpu: ${CPU_LIMIT}
memory: ${MEMORY_LIMIT}
env:
- name: CLOWDER_ENABLED
value: ${CLOWDER_ENABLED}
database:
name: ros
version: 12
kafkaTopics:
- topicName: platform.inventory.events
partitions: 1
- topicName: platform.engine.results
partitions: 1
parameters:
- description: Enable rbac needs to be "True" or "False"
name: ENABLE_RBAC
value: "True"
- description : ClowdEnvironment name
name: ENV_NAME
required: true
- description: min replicas
name: MIN_REPLICAS
value: "1"
- description: Image NAME
name: IMAGE
required: true
value: quay.io/cloudservices/ros-backend
- description: Image tag
name: IMAGE_TAG
required: true
- 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 Django 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"