Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/secrets-injector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: secrets-injector
description: Secrets Injector

type: application
version: 1.1.19
version: 1.1.20
appVersion: "0.1.0"

dependencies:
Expand Down
31 changes: 31 additions & 0 deletions system/secrets-injector/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- if .Values.networkPolicy.create }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: secrets-injector-allow
namespace: {{ .Release.Namespace }}
spec:
podSelector:
matchLabels:
app: secrets-injector
policyTypes:
- Ingress
{{- with .Values.networkPolicy.ingress }}
ingress: {{ toYaml . | nindent 4 }}
{{- end }}

---

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: secrets-injector-deny
namespace: {{ .Release.Namespace }}
spec:
podSelector:
matchLabels:
app: secrets-injector
policyTypes:
- Ingress
# no ingress rules => deny all
{{- end }}
12 changes: 11 additions & 1 deletion system/secrets-injector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ alerts:
enabled: true
ruleSelector:
prometheus: kubernetes

networkPolicy:
create: false
ingress: []
# Example allowing only from kube-system/vpn-shoot pod:
# - from:
# - namespaceSelector:
# matchLabels:
# kubernetes.io/metadata.name: kube-system
# podSelector:
# matchLabels:
# app: vpn-shoot