I am trying to add a zip file to our configmap due to the amount of files exceeding the 1mb limit. I deploy our charts with helm and was looking into binaryData but cannot get it to work properly. I wanted to see if anyone had any suggestions on how I could integrate this with helm so when the job is finished it deletes the configmap with it
Here is my configmap:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "db-migration.fullname" . }}
labels:
app: {{ template "db-migration.name" . }}
chart: {{ template "db-migration.chart" . }}
draft: {{ .Values.draft | default "draft-app" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
binaryData:
{{ .Files.Get "migrations.zip" | b64enc }}
immutable: true
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "db-migration.fullname" . }}-test
labels:
app: {{ template "db-migration.name" . }}
chart: {{ template "db-migration.chart" . }}
draft: {{ .Values.draft | default "draft-app" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
binaryData:
{{ .Files.Get "test.zip" | b64enc }}
immutable: true
The two zip files live inside the charts and I have a command to unzip them and then run the migration afterwards