Skip to content

Commit

Permalink
Fix mutualise resource definition
Browse files Browse the repository at this point in the history
  • Loading branch information
florianMalbranque committed Sep 4, 2024
1 parent 51d4221 commit eda9377
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 34 deletions.
1 change: 1 addition & 0 deletions charts/trino/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Create the name of the file auth secret to use

{{- define "trino.accessControlConfigMap" -}}
{{- if .Values.accessControl }}{{- if eq .Values.accessControl.type "configmap" }}
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
29 changes: 4 additions & 25 deletions charts/trino/templates/configmap-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,38 +122,17 @@ 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 }}
{{ include "trino.accessControlConfigMap" . }}

---
{{- 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 }}

---

Expand Down
12 changes: 3 additions & 9 deletions charts/trino/templates/configmap-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,22 +84,16 @@ data:
{{ end }}


{{- if .Values.accessControl }}
{{ include "trino.accessControlProperties" . }}
{{- end }}
{{ include "trino.accessControlProperties" . }}


{{- range $fileName, $fileContent := .Values.worker.additionalConfigFiles }}
{{ $fileName }}: |
{{- $fileContent | nindent 4 }}
{{- end }}

---
{{ include "trino.accessControlConfigMap" . }}

{{- if .Values.accessControl }}
{{- if eq .Values.accessControl.type "configmap" }}
{{ include "trino.accessControlConfigMap" . }}
{{- end }}
{{- end }}

---
apiVersion: v1
Expand Down

0 comments on commit eda9377

Please sign in to comment.