Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Last active February 16, 2023 04:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bharatmicrosystems/d1250d1badabadf99a9ed6d2d503b150 to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/d1250d1badabadf99a9ed6d2d503b150 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: custom-metric-sd
name: custom-metric-sd
namespace: default
spec:
replicas: 1
selector:
matchLabels:
run: custom-metric-sd
template:
metadata:
labels:
run: custom-metric-sd
spec:
containers:
- command: ["./direct-to-sd"]
args: ["--metric-name=responsetime", "--metric-value=40", "--pod-id=$(POD_ID)"]
image: gcr.io/google-samples/sd-dummy-exporter:latest
name: sd-dummy-exporter
resources:
requests:
cpu: 100m
env:
- name: POD_ID
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.uid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment