diff --git a/charts/kubedbcom-mariadb-editor-options/templates/_helpers.tpl b/charts/kubedbcom-mariadb-editor-options/templates/_helpers.tpl index 495cac143b..3e9774d860 100644 --- a/charts/kubedbcom-mariadb-editor-options/templates/_helpers.tpl +++ b/charts/kubedbcom-mariadb-editor-options/templates/_helpers.tpl @@ -130,6 +130,18 @@ seccompProfile: type: RuntimeDefault {{- end }} +{{- define "maxscale.container.securityContext" -}} +allowPrivilegeEscalation: false +capabilities: + drop: + - ALL +runAsGroup: 0 +runAsNonRoot: true +runAsUser: {{ $.Values.spec.openshift.securityContext.runAsUser | default 997 }} +seccompProfile: + type: RuntimeDefault +{{- end }} + {{- define "resource-profiles" -}} {{- $machines := .Files.Get "data/machines.yaml" | fromYaml -}} {{- $profiles := "" -}} diff --git a/charts/kubedbcom-mariadb-editor-options/templates/db.yaml b/charts/kubedbcom-mariadb-editor-options/templates/db.yaml index edccebc779..8b4be82d83 100644 --- a/charts/kubedbcom-mariadb-editor-options/templates/db.yaml +++ b/charts/kubedbcom-mariadb-editor-options/templates/db.yaml @@ -110,13 +110,13 @@ spec: podTemplate: spec: securityContext: - fsGroup: {{ .Values.spec.openshift.securityContext.runAsUser | default 999 }} + fsGroup: {{ .Values.spec.openshift.securityContext.runAsUser | default 997 }} containers: - name: maxscale resources: {{- toYaml .maxscale_res | nindent 16 }} securityContext: - {{- include "container.securityContext" . | nindent 16 }} + {{- include "maxscale.container.securityContext" . | nindent 16 }} {{- include "common.placement" . | nindent 10 }} {{- end }} storage: diff --git a/charts/kubedbcom-proxysql-editor-options/ui/functions.js b/charts/kubedbcom-proxysql-editor-options/ui/functions.js index f2104f47fb..9f082d3484 100644 --- a/charts/kubedbcom-proxysql-editor-options/ui/functions.js +++ b/charts/kubedbcom-proxysql-editor-options/ui/functions.js @@ -360,7 +360,11 @@ export const useFunc = (model) => { const resources = (resp && resp.data && resp.data.items) || [] const fileredResources = resources - .filter((item) => item.spec?.type === 'kubedb.com/mysql') + .filter((item) => + ['kubedb.com/mysql', 'kubedb.com/mariadb', 'kubedb.com/perconaxtradb'].includes( + item.spec?.type, + ), + ) .map((item) => { const name = (item.metadata && item.metadata.name) || '' return {