Merge " Sidecar filebeat container and ConfigMap"
[oom.git] / kubernetes / log / templates / kibana-deployment.yaml
1 #{{ if not .Values.disableLogKibana }}
2 apiVersion: extensions/v1beta1 
3 kind: Deployment
4 metadata:
5   labels:
6     app: kibana
7   name: log-kibana
8   namespace: {{ .Values.nsPrefix }}
9 spec:
10   replicas: {{ .Values.kibanaReplicas }}
11   selector:
12     matchLabels:
13       app: kibana
14   template:
15     metadata:
16       labels:
17         app: kibana
18       name: log-kibana
19     spec:
20       initContainers:
21       - command:
22         - /root/ready.py
23         args:
24         - --container-name
25         - elasticsearch
26         env:
27         - name: NAMESPACE
28           valueFrom:
29             fieldRef:
30               apiVersion: v1
31               fieldPath: metadata.namespace
32         image: {{ .Values.image.readiness }}
33         imagePullPolicy: {{ .Values.pullPolicy }}
34         name: kibana-readiness
35       containers:
36       - name: kibana
37         image: {{ .Values.image.kibana }}
38         ports:
39         - containerPort: 5601
40           name: http
41           protocol: TCP
42         readinessProbe:
43           tcpSocket:
44             port: 5601
45         volumeMounts:
46          - name: kibana-conf
47            mountPath: /usr/share/kibana/config/      
48       volumes:
49         - name: kibana-conf
50           configMap:
51             name: log-kibana-configmap
52             items:
53             - key: kibana.yml
54               path: kibana.yml
55 ---
56 apiVersion: v1
57 kind: ConfigMap
58 metadata:
59   name: log-kibana-configmap
60   namespace: {{ .Values.nsPrefix }}
61 data:
62 {{ tpl (.Files.Glob "resources/kibana/conf/kibana.yml").AsConfig . | indent 2 }}
63 #{{ end }}