forked from RedHatInsights/drift-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclowdapp.yaml
142 lines (138 loc) · 3.57 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
---
apiVersion: v1
kind: Template
metadata:
name: drift-backend
objects:
- apiVersion: cloud.redhat.com/v1alpha1
kind: ClowdApp
metadata:
name: drift-backend
labels:
app: drift-backend
spec:
envName: ${ENV_NAME}
dependencies:
- host-inventory
- rbac
- system-baseline
deployments:
- name: service
minReplicas: ${{MIN_REPLICAS}}
webServices:
public:
enabled: true
podSpec:
imagePullPolicy: Always
image: ${IMAGE}:${IMAGE_TAG}
livenessProbe:
httpGet:
path: /mgmt/v0/status
port: 8000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /mgmt/v0/status
port: 8000
initialDelaySeconds: 10
periodSeconds: 10
resources:
limits:
cpu: ${CPU_LIMIT}
memory: {MEMORY_LIMIT}
requests:
cpu: ${CPU_REQUEST}
memory: ${MEMORY_REQUEST}
volumes:
- emptyDir: {}
name: drift-prometheus-data
volumeMounts:
- mountPath: /prometheus-data
name: drift-prometheus-data
env:
- name: APP_CONFIG
value: gunicorn.conf.py
- name: ENABLE_RBAC
value: "${DRIFT_ENABLE_RBAC}"
- name: ENABLE_SMART_MANGEMENT_ENTITLEMENT_CHECK
value: "${ENABLE_SMART_MANGEMENT_ENTITLEMENT_CHECK}"
- name: WEB_CONCURRENCY
value: "4"
- name: PATH_PREFIX
value: /api/
- name: APP_NAME
value: drift
- name: ENABLE_PIPENV
value: 'true'
- name: prometheus_multiproc_dir
value: /prometheus-data
- name: DRIFT_SHARED_SECRET
valueFrom:
secretKeyRef:
key: shared-secret
name: drift-interpod-comms
- apiVersion: v1
kind: Service
metadata:
labels:
app: drift-backend
name: drift-backend
annotations:
prometheus.io/path: /mgmt/v0/metrics
prometheus.io/port: '8000'
prometheus.io/scrape: 'true'
spec:
type: ClusterIP
selector:
deploymentconfig: drift-backend
ports:
- name: 8000-tcp
port: 8000
protocol: TCP
targetPort: 8000
- apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: drift-backend
labels:
app: drift-backend
spec:
scaleTargetRef:
apiVersion: v1
kind: DeploymentConfig
name: drift-backend
minReplicas: ${{MIN_REPLICAS}}
maxReplicas: ${{MAX_REPLICAS}}
targetCPUUtilizationPercentage: 50
parameters:
- name: DRIFT_ENABLE_RBAC
description: enable rbac. needs to be "True" or "False".
value: "True"
- name: ENABLE_SMART_MANGEMENT_ENTITLEMENT_CHECK
description: enable the smart mgmt entitlement check on requests. Needs to be "True" or "False".
value: "False"
- name: IMAGE_TAG
description: image tag to pull
value: latest
- name: IMAGE
description: image name
value: quay.io/cloudservices/drift-backend
- name: MIN_REPLICAS
description: minimum pod replicas for horizontal pod autoscaler
value: "2"
- name: MAX_REPLICAS
description: maximum pod replicas for horizontal pod autoscaler
value: "2"
- name: CPU_LIMIT
value: 500m
- name: MEMORY_LIMIT
value: 500Mi
- name: CPU_REQUEST
value: 100m
- name: MEMORY_REQUEST
value: 300Mi
- description: ClowdEnv Name
name: ENV_NAME
- name: CLOWDER_ENABLED
value: "true"