Skip to content

Commit

Permalink
Create pod monitor for posthog nginx.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellw committed Nov 25, 2023
1 parent 8c8fada commit 575fb16
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions apps/prod/posthog/ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,6 @@ spec:
app.kubernetes.io/name: posthog-ingress-nginx
annotations:
config.linkerd.io/trace-collector: collector.linkerd-jaeger.svc.cluster.local:55678
prometheus.io/scrape: "true"
prometheus.io/port: "10254"
spec:
tolerations:
- key: "nginx"
Expand Down Expand Up @@ -694,3 +692,28 @@ webhooks:
resources:
- ingresses
sideEffects: None
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: posthog-ingress-nginx-podmonitor
namespace: posthog-ingress-nginx
labels:
app.kubernetes.io/part-of: compose
spec:
podMetricsEndpoints:
- path: /metrics
targetPort: 10254
namespaceSelector:
matchNames:
- posthog-ingress-nginx
selector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- posthog-ingress-nginx
- key: compose.ai/ignore-monitoring
operator: DoesNotExist
values:
- "ignore"

0 comments on commit 575fb16

Please sign in to comment.