Upgrade to Cassandra 3
[sdc.git] / sdc-os-chef / kubernetes / sdc / templates / deployments / sdc-cs.yaml
1 #{{ if not .Values.disableSdcSdcCs }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   labels:
6     app: sdc-cs
7   name: sdc-cs
8   namespace: "{{ .Values.nsPrefix }}-sdc"
9 spec:
10   selector:
11     matchLabels:
12       app: sdc-cs
13   template:
14     metadata:
15       labels:
16         app: sdc-cs
17       name: sdc-cs
18     spec:
19       containers:
20       - name: sdc-cs
21         image: "{{ .Values.image.sdcCassandra }}"
22         imagePullPolicy: "{{ .Values.pullPolicy }}"
23         env:
24         - name: ENVNAME
25           value: "{{ .Values.env.name }}"
26         - name: HOST_IP
27           valueFrom:
28             fieldRef:
29               fieldPath: status.podIP
30         - name: CS_PASSWORD
31           valueFrom:
32             secretKeyRef: {name: sdc-cs-secret, key: cs_password}
33         - name: MAX_HEAP_SIZE
34           value: 1536M
35         - name: HEAP_NEWSIZE
36           value: 512M
37         volumeMounts:
38         - mountPath: /var/lib/cassandra/
39           name: sdc-sdc-cs-cs
40         - mountPath: /root/chef-solo/environments/
41           name: sdc-environments
42         - mountPath: /etc/localtime
43           name: sdc-localtime
44           readOnly: true
45         - mountPath: /var/lib/jetty/logs
46           name: sdc-logs
47         ports:
48         - containerPort: 9042
49         readinessProbe:
50           exec:
51             command:
52             - "/var/lib/ready-probe.sh"
53           initialDelaySeconds: 60
54           periodSeconds: 10
55       volumes:
56       - name: sdc-sdc-cs-cs
57         persistentVolumeClaim:
58           claimName: sdc-cs-db
59       - name: sdc-environments
60         configMap:
61           name: sdc-environment
62       - name: sdc-localtime
63         hostPath:
64           path:  /etc/localtime
65       - name:  sdc-logs
66         hostPath:
67           path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs
68       imagePullSecrets:
69       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
70 #{{ end }}