Files
charts/bitnami/rabbitmq/templates/networkpolicy.yaml
Miguel Ruiz 3315cbd9f3 [bitnami/rabbitmq] Chart standardised (#9817)
* [bitnami/rabbitmq] Chart standardised

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update bitnami/rabbitmq/templates/networkpolicy.yaml

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>

* Update bitnami/rabbitmq/templates/secrets.yaml

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* Update VIB parameters

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <containers@bitnami.com>

* [bitnami/rabbitmq] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Francisco de Paz Galán <fdepaz@vmware.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
2022-04-28 19:10:49 +02:00

41 lines
1.6 KiB
YAML

{{- if .Values.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
ingress:
# Allow inbound connections
- ports:
- port: {{ .Values.service.ports.epmd }} # EPMD
- port: {{ .Values.service.ports.amqp }}
- port: {{ .Values.service.ports.amqpTls }}
- port: {{ .Values.service.ports.dist }}
- port: {{ .Values.service.ports.manager }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels:
{{ printf "%s-client" (include "common.names.fullname" .) }}: "true"
- podSelector:
matchLabels:
{{- include "common.labels.matchLabels" . | nindent 14 }}
{{- if .Values.networkPolicy.additionalRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.additionalRules "context" $) | nindent 8 }}
{{- end }}
{{- end }}
# Allow prometheus scrapes
- ports:
- port: {{ .Values.service.ports.metrics }}
{{- end }}