Skip to content

Commit

Permalink
refact: combine networkpolicies into one template
Browse files Browse the repository at this point in the history
Signed-off-by: wilmarguida <[email protected]>
  • Loading branch information
wilmardo authored and grieshaber committed Nov 25, 2022
1 parent 425f646 commit b90a43e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 20 deletions.
20 changes: 0 additions & 20 deletions charts/keycloakx/templates/networkpolicy-egress.yaml

This file was deleted.

7 changes: 7 additions & 0 deletions charts/keycloakx/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
spec:
policyTypes:
- Ingress
{{- if .Values.networkPolicy.egress }}
- Egress
{{- end}}
podSelector:
matchLabels:
{{- include "keycloak.selectorLabels" . | nindent 6 }}
Expand Down Expand Up @@ -42,4 +45,8 @@ spec:
- protocol: {{ default "TCP" .protocol }}
port: {{ .containerPort }}
{{- end }}
{{- if .Values.networkPolicy.egress }}
egress:
{{- .Values.networkPolicy.egress | toYaml | nindent 4 }}
{{- end }}
{{- end }}

0 comments on commit b90a43e

Please sign in to comment.