Skip to content

Commit

Permalink
reorder networkpolicies
Browse files Browse the repository at this point in the history
  • Loading branch information
eumel8 committed Jan 10, 2025
1 parent 7c9c768 commit e848fb5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
20 changes: 0 additions & 20 deletions chart/templates/entsoe-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,4 @@ spec:
- name: tmp
emptyDir:
medium: Memory
{{ if .Values.entsoe.proxy.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: entsoe-{{ include "caas-carbon-footprint.fullname" . }}
spec:
egress:
- ports:
- port: {{ .Values.entsoe.proxy.port }}
protocol: TCP
to:
- ipBlock:
cidr: {{ .Values.entsoe.proxy.host }}/32
podSelector:
matchLabels:
{{- include "caas-carbon-footprint.selectorLabels" . | nindent 6 }}
policyTypes:
- Egress
{{ end }}
{{ end }}
22 changes: 21 additions & 1 deletion chart/templates/entsoe-networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: entsoe-{{ include "caas-carbon-footprint.fullname" . }}
name: entsoe-monitor-{{ include "caas-carbon-footprint.fullname" . }}
labels:
app.kubernetes.io/component: entsoe
{{- include "caas-carbon-footprint.labels" . | nindent 4 }}
Expand All @@ -21,4 +21,24 @@ spec:
policyTypes:
- Ingress
- Egress
{{ if .Values.entsoe.proxy.enabled }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: entsoe-proxy-{{ include "caas-carbon-footprint.fullname" . }}
spec:
egress:
- ports:
- port: {{ .Values.entsoe.proxy.port }}
protocol: TCP
to:
- ipBlock:
cidr: {{ .Values.entsoe.proxy.host }}/32
podSelector:
matchLabels:
{{- include "caas-carbon-footprint.selectorLabels" . | nindent 6 }}
policyTypes:
- Egress
{{ end }}
{{ end }}

0 comments on commit e848fb5

Please sign in to comment.