rancher-partner-charts/charts/kubecost/cost-analyzer/2.2.2/templates/prometheus-pushgateway-netw...

23 lines
667 B
YAML
Raw Normal View History

2021-06-24 01:55:05 +00:00
{{ if .Values.global.prometheus.enabled }}
{{- if and .Values.prometheus.pushgateway.enabled .Values.networkPolicy.enabled -}}
apiVersion: networking.k8s.io/v1
2021-06-24 01:55:05 +00:00
kind: NetworkPolicy
metadata:
name: {{ template "prometheus.pushgateway.fullname" . }}
namespace: {{ .Release.Namespace }}
2021-06-24 01:55:05 +00:00
labels:
{{- include "prometheus.pushgateway.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "prometheus.pushgateway.matchLabels" . | nindent 6 }}
ingress:
- from:
- podSelector:
matchLabels:
{{- include "prometheus.server.matchLabels" . | nindent 12 }}
- ports:
- port: 9091
{{- end -}}
{{ end }}