Skip to content

Commit

Permalink
Added NP to application-operations-alerting
Browse files Browse the repository at this point in the history
  • Loading branch information
netic-jsj committed Apr 25, 2024
1 parent 5a612fb commit 1dc4dd2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/aoi/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: aoi
description: A Helm chart for Netic application operations infrastructure
type: application
version: 0.1.13
version: 0.1.14
dependencies:
- name: grafana
version: 7.3.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ spec:
enabled: true
extraLabels:
netic.dk/monitoring: "true"
netic.dk/allow-prometheus-scraping: "true"
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,28 @@ spec:
app.kubernetes.io/name: victoria-metrics-alert
policyTypes:
- Ingress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: prometheus-scrape-ingress
namespace: {{ $namespace }}
spec:
ingress:
- from:
- namespaceSelector: {}
podSelector:
matchLabels:
app.kubernetes.io/name: prometheus
ports:
- port: metrics
protocol: TCP
- port: http
protocol: TCP
podSelector:
matchLabels:
netic.dk/allow-prometheus-scraping: "true"
policyTypes:
- Ingress
{{- end }}
{{- end }}

0 comments on commit 1dc4dd2

Please sign in to comment.