Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(job): argument list too long #383

Merged
merged 10 commits into from
Feb 5, 2025
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{{- if not .Values.installer.skipValidation }}
apiVersion: v1
kind: ConfigMap
metadata:
name: validate-values-config
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-delete-policy: hook-succeeded,before-hook-creation,hook-failed
helm.sh/hook-weight: "-10"
data:
values.yaml: |
{{ .Values | toYaml | indent 4 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better change an indent value


---
apiVersion: batch/v1
kind: Job
metadata:
Expand Down Expand Up @@ -26,7 +39,12 @@ spec:
value: {{ .Chart.Version }}
command: ["sh", "-c"]
args:
- |
echo {{ .Values | toYaml | quote }} > values.yaml
cf helm validate --values values.yaml --namespace ${NAMESPACE} --version ${VERSION} --hook --log-level debug
- cf helm validate --values /job_tmp/values.yaml --namespace ${NAMESPACE} --version ${VERSION} --hook --log-level debug
volumeMounts:
- name: customized-values
mountPath: "/job_tmp"
volumes:
- name: customized-values
configMap:
name: validate-values-config
{{- end }}