Skip to content

Instantly share code, notes, and snippets.

@making
Last active February 28, 2021 05:22
Show Gist options
  • Save making/fdfd3a38803333e78331653075908e1c to your computer and use it in GitHub Desktop.
Save making/fdfd3a38803333e78331653075908e1c to your computer and use it in GitHub Desktop.
Prometheus Scrape用のアノテーションを追加したい
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: demo
name: demo
spec:
replicas: 1
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- image: ghcr.io/making/hello-tanzu
name: hello-tanzu
#@ load("@ytt:overlay", "overlay")
#@overlay/match by=overlay.subset({"kind":"Deployment", "metadata": {"name": "demo"}})
---
spec:
template:
metadata:
#@overlay/match missing_ok=True
#@overlay/match-child-defaults missing_ok=True
annotations:
prometheus.io/path: "/actuator/prometheus"
prometheus.io/scrape: "true"
prometheus.io/port: "8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment