This repository has been archived by the owner on Sep 8, 2022. It is now read-only.
forked from spotify/bigtable-autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbigtable-autoscaler-service.yaml
88 lines (88 loc) · 2.35 KB
/
bigtable-autoscaler-service.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
apiVersion: v1
kind: Service
metadata:
name: bigtable-autoscaler
labels:
app: bigtable-autoscaler
app.kubernetes.io/name: bigtable-autoscaler
app.kubernetes.io/part-of: recommendations
k8s.bluecore.com/team: datascience
spec:
type: NodePort
ports:
- name: http
targetPort: 8080
port: 8080
selector:
app: bigtable-autoscaler
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bigtable-autoscaler
labels:
app: bigtable-autoscaler
app.kubernetes.io/name: bigtable-autoscaler
app.kubernetes.io/part-of: recommendations
k8s.bluecore.com/team: datascience
spec:
replicas: 1
selector:
matchLabels:
app: bigtable-autoscaler
template:
metadata:
labels:
app: bigtable-autoscaler
app.kubernetes.io/name: bigtable-autoscaler
app.kubernetes.io/part-of: recommendations
k8s.bluecore.com/team: datascience
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: 'true'
spec:
containers:
- name: bigtable-autoscaler
image: {{IMAGE}}
imagePullPolicy: Always
volumeMounts:
- mountPath: /service-account
name: service-account
resources:
requests:
cpu: "0.25"
memory: 512Mi
limits:
memory: 512Mi
env:
- name: ENVIRONMENT
value: remote
- name: GOOGLE_APPLICATION_CREDENTIALS
value: service-account/key.json
- name: DB_HOSTNAME
valueFrom:
secretKeyRef:
name: bigtable-autoscaler-database
key: hostname
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: bigtable-autoscaler-database
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: bigtable-autoscaler-database
key: password
- name: JDBC_URL
value: jdbc:postgresql://$(DB_HOSTNAME):5432/autoscaler
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 65534
capabilities:
drop:
- all
volumes:
- name: service-account
secret:
secretName: bigtable-autoscaler-service