Skip to content

Commit 8428a75

Browse files
committed
improve
1 parent f5d3689 commit 8428a75

File tree

8 files changed

+461
-257
lines changed

8 files changed

+461
-257
lines changed

charts/sn-platform-slim/templates/bookkeeper/bookkeeper-authorizationpolicy.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ metadata:
1010
namespace: {{ template "pulsar.namespace" . }}
1111
spec:
1212
rules:
13-
- to:
13+
- {{- if .Values.bookkeeper.authorizationPolicy.from }}
14+
from:
15+
{{ toYaml .Values.bookkeeper.authorizationPolicy.from | indent 4 }}
16+
{{- end }}
17+
{{- if .Values.bookkeeper.authorizationPolicy.to }}
18+
to:
19+
{{ toYaml .Values.bookkeeper.authorizationPolicy.to | indent 4 }}
20+
{{- else }}
21+
to:
1422
- operation:
1523
ports:
1624
- "3181"
1725
- "8000"
26+
{{- end }}
1827
action: ALLOW
1928
selector:
2029
matchLabels:
@@ -30,10 +39,19 @@ metadata:
3039
namespace: {{ template "pulsar.namespace" . }}
3140
spec:
3241
rules:
33-
- to:
42+
- {{- if .Values.autorecovery.authorizationPolicy.from }}
43+
from:
44+
{{ toYaml .Values.autorecovery.authorizationPolicy.from | indent 4 }}
45+
{{- end }}
46+
{{- if .Values.autorecovery.authorizationPolicy.to }}
47+
to:
48+
{{ toYaml .Values.autorecovery.authorizationPolicy.to | indent 4 }}
49+
{{- else }}
50+
to:
3451
- operation:
3552
ports:
3653
- "{{ .Values.autorecovery.ports.http }}"
54+
{{- end }}
3755
action: ALLOW
3856
selector:
3957
matchLabels:

charts/sn-platform-slim/templates/broker/broker-authorizationpolicy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ metadata:
1010
namespace: {{ template "pulsar.namespace" . }}
1111
spec:
1212
rules:
13-
- to:
13+
- {{- if .Values.broker.authorizationPolicy.from }}
14+
from:
15+
{{ toYaml .Values.broker.authorizationPolicy.from | indent 4 }}
16+
{{- end }}
17+
{{- if .Values.broker.authorizationPolicy.to }}
18+
to:
19+
{{ toYaml .Values.broker.authorizationPolicy.to | indent 4 }}
20+
{{- else }}
21+
to:
1422
- operation:
1523
ports:
1624
- "6650"
@@ -41,6 +49,7 @@ spec:
4149
- "9095"
4250
{{- end }}
4351
{{- end }}
52+
{{- end }}
4453
action: ALLOW
4554
selector:
4655
matchLabels:

charts/sn-platform-slim/templates/zookeeper/zookeeper-authorizationpolicy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ metadata:
1010
namespace: {{ template "pulsar.namespace" . }}
1111
spec:
1212
rules:
13-
- to:
13+
- {{- if .Values.zookeeper.authorizationPolicy.from }}
14+
from:
15+
{{ toYaml .Values.zookeeper.authorizationPolicy.from | indent 4 }}
16+
{{- end }}
17+
{{- if .Values.zookeeper.authorizationPolicy.to }}
18+
to:
19+
{{ toYaml .Values.zookeeper.authorizationPolicy.to | indent 4 }}
20+
{{- else }}
21+
to:
1422
- operation:
1523
ports:
1624
- "2181"
1725
- "9990"
1826
- "2888"
1927
- "3888"
2028
- "{{ .Values.zookeeper.ports.metrics }}"
29+
{{- end }}
2130
action: ALLOW
2231
selector:
2332
matchLabels:

0 commit comments

Comments
 (0)