X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Fcloudtaf.git;a=blobdiff_plain;f=testcases%2Fpm-support%2Fmisc%2Fcustom-metrics-dep.yaml;fp=testcases%2Fpm-support%2Fmisc%2Fcustom-metrics-dep.yaml;h=37a0fa5138423a4735627c6923f49aab9c59fc21;hp=0000000000000000000000000000000000000000;hb=fab50fee1cc75156a4113a20dcbb13e41ca2a7c4;hpb=15c350f3e5491c681ead4de5b049693d50d53fc7 diff --git a/testcases/pm-support/misc/custom-metrics-dep.yaml b/testcases/pm-support/misc/custom-metrics-dep.yaml new file mode 100644 index 0000000..37a0fa5 --- /dev/null +++ b/testcases/pm-support/misc/custom-metrics-dep.yaml @@ -0,0 +1,70 @@ +--- +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: custommetrics + namespace: kube-system +spec: + selector: + matchLabels: + k8s-app: custommetrics + replicas: 2 + template: + metadata: + labels: + app: custommetrics + k8s-app: custommetrics + annotations: + prometheus.io/scrape: 'true' + danm.k8s.io/interfaces: | + [ + { + "network":"flannel" + } + ] + spec: + containers: + - name: custommetricsd + image: registry.kube-system.svc.rec.io:5555/custom_metrics_test:0.1 + imagePullPolicy: Always + command: + - python + - custom_metrics_test.py + volumeMounts: + - name: metadata + mountPath: /etc/custommetricsd/metadata + readOnly: true + ports: + - containerPort: 9100 + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 9100 + initialDelaySeconds: 1 + periodSeconds: 2 + failureThreshold: 1 + livenessProbe: + httpGet: + path: /healthz + port: 9100 + initialDelaySeconds: 1 + periodSeconds: 3 + failureThreshold: 2 + resources: + requests: + memory: "32Mi" + cpu: "1m" + limits: + memory: "256Mi" + cpu: "100m" + volumes: + - name: metadata + downwardAPI: + items: + - path: "labels" + fieldRef: + fieldPath: metadata.labels + - path: "annotations" + fieldRef: + fieldPath: metadata.annotations