diff --git a/charts/trino/templates/_helpers.tpl b/charts/trino/templates/_helpers.tpl index e1682c80..48b30358 100644 --- a/charts/trino/templates/_helpers.tpl +++ b/charts/trino/templates/_helpers.tpl @@ -141,22 +141,6 @@ Create the name of the file auth secret to use {{- end }} -{{- define "trino.accessControlConfigMap" -}} -{{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "trino.fullname" . }}-access-control-volume - namespace: {{ .Release.Namespace }} - labels: - {{- include "trino.labels" . | nindent 4 }} -data: - {{- range $key, $val := .Values.accessControl.rules }} - {{ $key }}: {{ $val | quote }} - {{- end }} -{{- end }}{{- end }} -{{- end }} - {{- define "trino.accessControlProperties" -}} {{- if .Values.accessControl }} diff --git a/charts/trino/templates/configmap-access-control.yaml b/charts/trino/templates/configmap-access-control.yaml new file mode 100644 index 00000000..46ef4582 --- /dev/null +++ b/charts/trino/templates/configmap-access-control.yaml @@ -0,0 +1,15 @@ +{{- define "trino.accessControlConfigMap" -}} +{{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "trino.fullname" . }}-access-control-volume + namespace: {{ .Release.Namespace }} + labels: + {{- include "trino.labels" . | nindent 4 }} +data: + {{- range $key, $val := .Values.accessControl.rules }} + {{ $key }}: {{ $val | quote }} + {{- end }} +{{- end }}{{- end }} +{{- end }} diff --git a/charts/trino/templates/configmap-coordinator.yaml b/charts/trino/templates/configmap-coordinator.yaml index 1f21acd3..3e67393e 100644 --- a/charts/trino/templates/configmap-coordinator.yaml +++ b/charts/trino/templates/configmap-coordinator.yaml @@ -122,41 +122,16 @@ data: {{- end }} {{ end }} -{{- if .Values.accessControl }} - {{ include "trino.accessControlProperties" . }} -{{- end }} -{{- range $fileName, $fileContent := .Values.worker.additionalConfigFiles }} +{{ include "trino.accessControlProperties" . }} + +{{- range $fileName, $fileContent := .Values.coordinator.additionalConfigFiles }} {{ $fileName }}: | {{- $fileContent | nindent 4 }} {{- end }} --- -{{- if .Values.accessControl }} - {{- if eq .Values.accessControl.type "configmap" }} - {{ include "trino.accessControlConfigMap" . }} - {{- end }} -{{- end }} - ---- -{{- if .Values.resourceGroups }} - -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "trino.fullname" . }}-resource-groups-volume-coordinator - namespace: {{ .Release.Namespace }} - labels: - {{- include "trino.labels" . | nindent 4 }} - app.kubernetes.io/component: coordinator -data: - resource-groups.json: |- - {{- .Values.resourceGroups.resourceGroupsConfig | nindent 4 }} -{{- end }} - ---- - apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/trino/templates/configmap-worker.yaml b/charts/trino/templates/configmap-worker.yaml index e5f24daa..3e81f37a 100644 --- a/charts/trino/templates/configmap-worker.yaml +++ b/charts/trino/templates/configmap-worker.yaml @@ -84,23 +84,14 @@ data: {{ end }} -{{- if .Values.accessControl }} - {{ include "trino.accessControlProperties" . }} -{{- end }} +{{ include "trino.accessControlProperties" . }} + {{- range $fileName, $fileContent := .Values.worker.additionalConfigFiles }} {{ $fileName }}: | {{- $fileContent | nindent 4 }} {{- end }} ---- - -{{- if .Values.accessControl }} - {{- if eq .Values.accessControl.type "configmap" }} - {{ include "trino.accessControlConfigMap" . }} - {{- end }} -{{- end }} - --- apiVersion: v1 kind: ConfigMap