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
12 changes: 12 additions & 0 deletions charts/kubedbcom-mariadb-editor-options/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 := "" -}}
Expand Down
4 changes: 2 additions & 2 deletions charts/kubedbcom-mariadb-editor-options/templates/db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion charts/kubedbcom-proxysql-editor-options/ui/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading