Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.bookkeeper.authorizationPolicy.from }}
from:
{{ toYaml .Values.bookkeeper.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.bookkeeper.authorizationPolicy.to }}
to:
{{ toYaml .Values.bookkeeper.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "3181"
- "8000"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand All @@ -30,10 +39,19 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.autorecovery.authorizationPolicy.from }}
from:
{{ toYaml .Values.autorecovery.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.autorecovery.authorizationPolicy.to }}
to:
{{ toYaml .Values.autorecovery.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "{{ .Values.autorecovery.ports.http }}"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.broker.authorizationPolicy.from }}
from:
{{ toYaml .Values.broker.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.broker.authorizationPolicy.to }}
to:
{{ toYaml .Values.broker.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "6650"
Expand Down Expand Up @@ -41,6 +49,7 @@ spec:
- "9095"
{{- end }}
{{- end }}
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.zookeeper.authorizationPolicy.from }}
from:
{{ toYaml .Values.zookeeper.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.zookeeper.authorizationPolicy.to }}
to:
{{ toYaml .Values.zookeeper.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "2181"
- "9990"
- "2888"
- "3888"
- "{{ .Values.zookeeper.ports.metrics }}"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
80 changes: 80 additions & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,26 @@ zookeeper:
# The template field can totally change the log config of the component. The value is a string, which is the content of the log config file.
template: {}

# Istio AuthorizationPolicy configuration
# Configure the 'from' and 'to' sections to restrict sources and operations
# If 'to' is not specified, default ports will be used
# Example:
# authorizationPolicy:
# from:
# - source:
# principals: ["cluster.local/ns/default/sa/pulsar-broker"]
# - source:
# namespaces: ["pulsar"]
# to:
# - operation:
# ports: ["2181", "9990"]
# methods: ["GET", "POST"]
# paths: ["/metrics"]
# hosts: ["zookeeper.pulsar.svc.cluster.local"]
authorizationPolicy:
from: []
to: []

# use a component name that matches your grafana configuration
# so the metrics are correctly rendered in grafana dashboard
component: zookeeper
Expand Down Expand Up @@ -815,6 +835,26 @@ bookkeeper:
# The template field can totally change the log config of the component. The value is a string, which is the content of the log config file.
template: {}

# Istio AuthorizationPolicy configuration
# Configure the 'from' and 'to' sections to restrict sources and operations
# If 'to' is not specified, default ports will be used
# Example:
# authorizationPolicy:
# from:
# - source:
# principals: ["cluster.local/ns/default/sa/pulsar-broker"]
# - source:
# namespaces: ["pulsar"]
# to:
# - operation:
# ports: ["3181", "8000"]
# methods: ["GET", "POST"]
# paths: ["/metrics"]
# hosts: ["bookie.pulsar.svc.cluster.local"]
authorizationPolicy:
from: []
to: []

# use a component name that matches your grafana configuration
# so the metrics are correctly rendered in grafana dashboard
component: bookie
Expand Down Expand Up @@ -980,6 +1020,26 @@ bookkeeper:
## templates/autorecovery-statefulset.yaml
##
autorecovery:
# Istio AuthorizationPolicy configuration
# Configure the 'from' and 'to' sections to restrict sources and operations
# If 'to' is not specified, default ports will be used
# Example:
# authorizationPolicy:
# from:
# - source:
# principals: ["cluster.local/ns/default/sa/pulsar-broker"]
# - source:
# namespaces: ["pulsar"]
# to:
# - operation:
# ports: ["8000"]
# methods: ["GET", "POST"]
# paths: ["/metrics"]
# hosts: ["recovery.pulsar.svc.cluster.local"]
authorizationPolicy:
from: []
to: []

# use a component name that matches your grafana configuration
# so the metrics are correctly rendered in grafana dashboard
component: recovery
Expand Down Expand Up @@ -1084,6 +1144,26 @@ broker:
# The template field can totally change the log config of the component. The value is a string, which is the content of the log config file.
template: {}

# Istio AuthorizationPolicy configuration
# Configure the 'from' and 'to' sections to restrict sources and operations
# If 'to' is not specified, default ports will be used
# Example:
# authorizationPolicy:
# from:
# - source:
# principals: ["cluster.local/ns/default/sa/pulsar-proxy"]
# - source:
# namespaces: ["pulsar"]
# to:
# - operation:
# ports: ["6650", "8080"]
# methods: ["GET", "POST"]
# paths: ["/metrics"]
# hosts: ["broker.pulsar.svc.cluster.local"]
authorizationPolicy:
from: []
to: []

# use a component name that matches your grafana configuration
# so the metrics are correctly rendered in grafana dashboard
component: broker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.bookkeeper.authorizationPolicy.from }}
from:
{{ toYaml .Values.bookkeeper.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.bookkeeper.authorizationPolicy.to }}
to:
{{ toYaml .Values.bookkeeper.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "3181"
- "8000"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand All @@ -30,10 +39,19 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.autorecovery.authorizationPolicy.from }}
from:
{{ toYaml .Values.autorecovery.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.autorecovery.authorizationPolicy.to }}
to:
{{ toYaml .Values.autorecovery.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "{{ .Values.autorecovery.ports.http }}"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.broker.authorizationPolicy.from }}
from:
{{ toYaml .Values.broker.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.broker.authorizationPolicy.to }}
to:
{{ toYaml .Values.broker.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "6650"
Expand Down Expand Up @@ -41,6 +49,7 @@ spec:
- "9095"
{{- end }}
{{- end }}
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,23 @@ metadata:
namespace: {{ template "pulsar.namespace" . }}
spec:
rules:
- to:
- {{- if .Values.zookeeper.authorizationPolicy.from }}
from:
{{ toYaml .Values.zookeeper.authorizationPolicy.from | indent 4 }}
{{- end }}
{{- if .Values.zookeeper.authorizationPolicy.to }}
to:
{{ toYaml .Values.zookeeper.authorizationPolicy.to | indent 4 }}
{{- else }}
to:
- operation:
ports:
- "2181"
- "9990"
- "2888"
- "3888"
- "{{ .Values.zookeeper.ports.metrics }}"
{{- end }}
action: ALLOW
selector:
matchLabels:
Expand Down
Loading
Loading