Skip to content

Commit

Permalink
fix: no syncer policy rules (#1438)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyelei authored Jan 24, 2025
1 parent 46865de commit d5f2bc4
Show file tree
Hide file tree
Showing 18 changed files with 72 additions and 0 deletions.
7 changes: 7 additions & 0 deletions addons/apecloud-mysql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ maintainers:
sources:
- https://github.com/apecloud/kubeblocks/


dependencies:
- name: kblib
version: 0.1.0
repository: file://../kblib
alias: extra

annotations:
addon.kubeblocks.io/kubeblocks-version: ">=1.0.0"
addon.kubeblocks.io/model: "RDBMS"
Expand Down
1 change: 1 addition & 0 deletions addons/apecloud-mysql/templates/cmpd-apecloudmysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
constraintRef: {{ include "apecloud-mysql.configConstraintVttabletName" . }}
volumeName: mysql-scale-config
namespace: {{ .Release.Namespace }}
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- command:
Expand Down
7 changes: 7 additions & 0 deletions addons/apecloud-postgresql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ maintainers:
sources:
- https://github.com/apecloud/kubeblocks/


dependencies:
- name: kblib
version: 0.1.0
repository: file://../kblib
alias: extra

annotations:
addon.kubeblocks.io/kubeblocks-version: ">=1.0.0"
addon.kubeblocks.io/model: "RDBMS"
Expand Down
1 change: 1 addition & 0 deletions addons/apecloud-postgresql/templates/cmpd-apepg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ spec:
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
{{- include "apecloud-postgresql.spec.runtime.common" . | nindent 2 }}
33 changes: 33 additions & 0 deletions addons/kblib/templates/_common.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{{- define "kblib.syncer.policyRules" -}}
policyRules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- get
- list
- patch
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- apiGroups:
- ""
resources:
- events
verbs:
- create
- apiGroups:
- "apps.kubeblocks.io"
resources:
- clusters
verbs:
- get
- list
{{- end -}}
6 changes: 6 additions & 0 deletions addons/mongodb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ maintainers:
- name: xuriwuyun
url: https://github.com/apecloud/kubeblocks/

dependencies:
- name: kblib
version: 0.1.0
repository: file://../kblib
alias: extra

annotations:
addon.kubeblocks.io/kubeblocks-version: ">=1.0.0"
addon.kubeblocks.io/model: "document"
Expand Down
1 change: 1 addition & 0 deletions addons/mongodb/templates/componentdefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ spec:
- name: secondary
updatePriority: 1
participatesInQuorum: true
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
lifecycleActions:
roleProbe:
periodSeconds: {{ .Values.roleProbe.periodSeconds }}
Expand Down
5 changes: 5 additions & 0 deletions addons/mysql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ appVersion: "5.7.44"
home: https://kubeblocks.io/
icon: https://kubeblocks.io/img/logo.png

dependencies:
- name: kblib
version: 0.1.0
repository: file://../kblib
alias: extra

maintainers:
- name: xuriwuyun
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql57-orc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- image: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:5.7.44
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql57.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- image: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:5.7.44
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql80-mgr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- image: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:8.0.33
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql80-orc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- image: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:8.0.33
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql80.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- image: {{ .Values.image.registry | default "docker.io" }}/apecloud/mysql_audit_log:8.0.33
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql84-mgr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- command:
Expand Down
1 change: 1 addition & 0 deletions addons/mysql/templates/cmpd-mysql84.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
namespace: {{ .Release.Namespace }}
reRenderResourceTypes:
- vscale
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
initContainers:
- command:
Expand Down
1 change: 1 addition & 0 deletions addons/vanilla-postgresql/templates/cmpd-12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
{{- include "vanilla-postgresql.spec.runtime.common" . | nindent 4 }}
containers:
Expand Down
1 change: 1 addition & 0 deletions addons/vanilla-postgresql/templates/cmpd-14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
{{- include "vanilla-postgresql.spec.runtime.common" . | nindent 4 }}
containers:
Expand Down
2 changes: 2 additions & 0 deletions addons/vanilla-postgresql/templates/cmpd-15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
{{- include "vanilla-postgresql.spec.runtime.common" . | nindent 4 }}
containers:
Expand Down Expand Up @@ -57,6 +58,7 @@ spec:
namespace: {{ .Release.Namespace }}
volumeName: scripts
defaultMode: 0555
{{- include "kblib.syncer.policyRules" . | nindent 2 }}
runtime:
{{- include "vanilla-postgresql.spec.runtime.common" . | nindent 4 }}
containers:
Expand Down

0 comments on commit d5f2bc4

Please sign in to comment.