21
templates/NetworkPolicy.yaml
Normal file
21
templates/NetworkPolicy.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
{{ range .Values.nfc_monitoring.network_policy.policies }}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ toYaml (get $.Values.nfc_monitoring .name ).labels | nindent 4 }}
|
||||||
|
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||||
|
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||||
|
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||||
|
name: {{ .name | replace "_" "-" }}
|
||||||
|
namespace: {{ (get $.Values.nfc_monitoring .name ).namespace }}
|
||||||
|
spec:
|
||||||
|
{{ toYaml .policy | nindent 2 }}
|
||||||
|
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
{{ toYaml (get $.Values.nfc_monitoring .name ).labels | nindent 6 }}
|
||||||
|
|
||||||
|
{{ end }}
|
17
values.yaml
17
values.yaml
@ -357,6 +357,23 @@ nfc_monitoring:
|
|||||||
label_value: "1"
|
label_value: "1"
|
||||||
|
|
||||||
|
|
||||||
|
network_policy:
|
||||||
|
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
# Network Policies to apply. These policies are automagically build using the values below.
|
||||||
|
#
|
||||||
|
# Do:
|
||||||
|
# - Define 'Ingress'
|
||||||
|
# - Define 'Egress'
|
||||||
|
# - Ensure that the name matches the item name from values.yaml. i.e. nfc_monitoring.{item_name}
|
||||||
|
# for prometheus the item name is 'prometheus'. This value is used to select items pertaining to
|
||||||
|
# that item from values.yaml. for example the labels and namespace.
|
||||||
|
# Dont:
|
||||||
|
# - Define 'podSelector' as this is alreaady included using the selector labels
|
||||||
|
policies:
|
||||||
|
|
||||||
|
|
||||||
loki_instance:
|
loki_instance:
|
||||||
image:
|
image:
|
||||||
name: grafana/loki
|
name: grafana/loki
|
||||||
|
Reference in New Issue
Block a user