simplified helm chart
This commit is contained in:
committed by
Jens Kristian Villadsen
parent
79fddf8309
commit
eaffce0d42
27
charts/hapi-fhir-jpaserver/templates/networkpolicy.yaml
Normal file
27
charts/hapi-fhir-jpaserver/templates/networkpolicy.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.networkPolicy.enabled }}
|
||||
kind: NetworkPolicy
|
||||
apiVersion: networking.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "hapi-fhir-jpaserver.fullname" . }}
|
||||
labels:
|
||||
{{- include "hapi-fhir-jpaserver.labels" . | nindent 4 }}
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
{{- include "hapi-fhir-jpaserver.selectorLabels" . | nindent 6 }}
|
||||
ingress:
|
||||
# Allow inbound connections from pods with the "hapi-fhir-jpaserver-client: true" label
|
||||
- ports:
|
||||
- port: http
|
||||
from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
{{ include "hapi-fhir-jpaserver.fullname" . }}-client: "true"
|
||||
{{- with .Values.networkPolicy.explicitNamespacesSelector }}
|
||||
namespaceSelector:
|
||||
{{ toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.networkPolicy.allowedFrom }}
|
||||
{{ tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user