Feature 7898: Helm chart and script for monitoring K8s based OSM system
[osm/devops.git] / installers / k8s / helm_charts / prometheus-kafka-exporter / templates / kafka-exporter-deployment.yaml
1 #   Licensed under the Apache License, Version 2.0 (the "License");
2 #   you may not use this file except in compliance with the License.
3 #   You may obtain a copy of the License at
4 #
5 #       http://www.apache.org/licenses/LICENSE-2.0
6 #
7 #   Unless required by applicable law or agreed to in writing, software
8 #   distributed under the License is distributed on an "AS IS" BASIS,
9 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 #   See the License for the specific language governing permissions and
11 #   limitations under the License.
12
13 apiVersion: apps/v1
14 kind: Deployment
15 metadata:
16   name: osm-kafka-exporter-deployment
17   namespace: monitoring
18 spec:
19   replicas: 1
20   selector:
21     matchLabels:
22       app.kubernetes.io/name: osm-kafka-exporter
23   template:
24     metadata:
25       labels:
26         app.kubernetes.io/name: osm-kafka-exporter
27     spec:
28       containers:
29       - name: kafka-exporter
30         image: danielqsj/kafka-exporter:latest
31         imagePullPolicy: IfNotPresent
32         args:
33         - --kafka.server=kafka.osm.svc.cluster.local:9092
34         - --web.listen-address=:9092
35         ports:
36         - name: metrics
37           containerPort: 9092
38           protocol: TCP
39         livenessProbe:
40           httpGet:
41             path: /
42             port: metrics
43           initialDelaySeconds: 10
44         readinessProbe:
45           httpGet:
46             path: /
47             port: metrics
48           initialDelaySeconds: 10
49 #        resources:
50 #          limits:
51 #            cpu: 250m
52 #            memory: 192Mi
53 #          requests:
54 #            cpu: 100m
55 #            memory: 128Mi
56 #        securityContext:
57 #          allowPrivilegeEscalation: false
58 #          capabilities:
59 #            drop: ["all"]
60 #          readOnlyRootFilesystem: true
61 #          runAsGroup: 10000
62 #          runAsNonRoot: true
63 #          runAsUser: 10000
64       terminationGracePeriodSeconds: 30