HELM(오류) 데이터: 너무 김: 최대 1048576바이트여야 합니다.

HELM(오류) 데이터: 너무 김: 최대 1048576바이트여야 합니다.

좋아, 각각 수많은 구성 파일이 포함된 여러 구성 요소로 구성된 거대한 애플리케이션이 있습니다.

디렉토리 트리는 다음과 같습니다

# ls -1 .
Chart.yaml
configs
templates
values.yaml

# ls -1 configs
component1-config
component2-config
component3-config
component4-config

# ls -1 templates
component1.yaml
component2.yaml
component3.yaml
component4.yaml
_helpers.tpl
secrets.yaml

아래와 같이 구성 요소당 여러 폴더에 대한 구성 매핑을 만들고 있습니다.

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-component1-folder1
  namespace: {{ .Values.nSpace }}
data:
{{ $currentScope := . }}
{{ range $path, $_ :=  .Files.Glob  "configs/component1/folder1/**" }}
{{- with $currentScope}}
  {{ (base $path) }}: |-
{{ .Files.Get $path | indent 6 }}
{{ end }}
{{ end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-component1-folder2
  namespace: {{ .Values.nSpace }}
data:
{{ $currentScope := . }}
{{ range $path, $_ :=  .Files.Glob  "configs/component1/folder2/**" }}
{{- with $currentScope}}
  {{ (base $path) }}: |-
{{ .Files.Get $path | indent 6 }}
{{ end }}
{{ end }}

일부 표준 배포 및 서비스의 문제점은 이를 실행할 때 애플리케이션이 커질 수 있으므로 피하고 싶은 문제가 helm install myapp .발생한다는 것입니다.data too long error

Error: INSTALLATION FAILED: create: failed to create: Secret "sh.helm.release.v1.myapp.v1" is invalid: data: Too long: must have at most 1048576 bytes

답변1

차트의 파일 또는 폴더(숨겨진 파일 및 폴더 포함)는 약 1MB를 초과할 수 없습니다. .hemignore제외할 파일을 삭제하거나 파일에 넣어야 합니다 .
제 경우에는 .git폴더가 1MB보다 커서 필요없으니 helm install삭제하고 나면 괜찮을 것 같습니다.

여기에 이미지 설명을 입력하세요.

같은 질문:
https://github.com/helm/helm/issues/1996

관련 정보