upload pm-support
[ta/cloudtaf.git] / testcases / pm-support / misc / custom-metrics-dep.yaml
1 ---
2 apiVersion: apps/v1beta2
3 kind: Deployment
4 metadata:
5   name: custommetrics
6   namespace: kube-system
7 spec:
8   selector:
9     matchLabels:
10       k8s-app: custommetrics
11   replicas: 2
12   template:
13     metadata:
14       labels:
15         app: custommetrics
16         k8s-app: custommetrics
17       annotations:
18         prometheus.io/scrape: 'true'
19         danm.k8s.io/interfaces: |
20           [
21             {
22               "network":"flannel"
23             }
24           ]
25     spec:
26       containers:
27       - name: custommetricsd
28         image: registry.kube-system.svc.rec.io:5555/custom_metrics_test:0.1
29         imagePullPolicy: Always
30         command:
31           - python
32           - custom_metrics_test.py
33         volumeMounts:
34           - name: metadata
35             mountPath: /etc/custommetricsd/metadata
36             readOnly: true
37         ports:
38         - containerPort: 9100
39           protocol: TCP
40         readinessProbe:
41           httpGet:
42             path: /readyz
43             port: 9100
44           initialDelaySeconds: 1
45           periodSeconds: 2
46           failureThreshold: 1
47         livenessProbe:
48           httpGet:
49             path: /healthz
50             port: 9100
51           initialDelaySeconds: 1
52           periodSeconds: 3
53           failureThreshold: 2
54         resources:
55           requests:
56             memory: "32Mi"
57             cpu: "1m"
58           limits:
59             memory: "256Mi"
60             cpu: "100m"
61       volumes:
62         - name: metadata
63           downwardAPI:
64             items:
65               - path: "labels"
66                 fieldRef:
67                   fieldPath: metadata.labels
68               - path: "annotations"
69                 fieldRef:
70                   fieldPath: metadata.annotations