Is this a request for help?: Yes
Version of Helm and Kubernetes: v1.13.4
Which chart: stable/lamp
What happened:
As soon as I try to activate the git part i get:
Error: release privatebin failed: Deployment in version "v1beta1" cannot be handled as a Deployment: v1beta1.Deployment.Spec: v1beta1.DeploymentSpec.Template: v1.PodTemplateSpec.Spec: v1.PodSpec.Containers: []v1.Container: v1.Container.Env: []v1.EnvVar: v1.EnvVar.Value: ReadString: expects " or n, but found 3, error found in #10 byte of ...|,"value":30},{"name"|..., bigger context ...|e":"FETCH_HEAD"},{"name":"GIT_SYNC_WAIT","value":30},{"name":"GIT_SYNC_DEST","value":"/git"}],"image|...
This is the git part:
git:
## git.enabled Enables Git service
enabled: true
## git.repoURL Git Repository URL
repoURL: https://github.com/PrivateBin/PrivateBin
## git.branch Repository branch to sync
branch: master
## git.revision Revision to sync
revision: FETCH_HEAD
## git.wait Time between Git syncs
wait: 30
## git.resources resource requests/limits
#resources: true
# requests:
# cpu: 1m
# memory: 1Mi
As you can see, i'm trying to get the privatebin repository. Am i doing it wrong?
What you expected to happen:
privatebin repository gets checked out to /var/www/html
thanks and cheers
Found the problem. Had to escape the quotes.
## git.wait Time between Git syncs
wait: \"30\"
Found the problem. Had to escape the quotes.
## git.wait Time between Git syncs wait: \"30\"
Hi! Could you please explain how you analysed this error? I had been fretting over this for hours.
wait: \"30\"
This is needed only if the values are to be used as environment variables. Environment variables are string only, and other types throw an error, although only a developer's mother could make sense of the cryptic message that is shown in the original post.
In my case, escaping quotes as shown by himpierre passed the initial checks, but failed the application because it didn't expect a boolean value to be quoted. The solution was to quote the variable in the template, not in the Values. This is also more robust because depending on the number of layers between Values and templates, the quotes are lost; the data type is only retained the first time.
- name: SPRING_DATA_CASSANDRA_PORT
value: "{{ .Values.cassandra.port }}"
- name: SPRING_DATA_CASSANDRA_SSL
value: "{{ .Values.cassandra.enableSsl }}"
- name: SPRING_DATA_CASSANDRA_PORT
value: "{{ .Values.cassandra.port }}"- name: SPRING_DATA_CASSANDRA_SSL
value: "{{ .Values.cassandra.enableSsl }}"
You may better use the quote function:
- name: SPRING_DATA_CASSANDRA_PORT
value: {{ quote .Values.cassandra.port }}
- name: SPRING_DATA_CASSANDRA_SSL
value: {{ quote .Values.cassandra.enableSsl }}
Most helpful comment
Found the problem. Had to escape the quotes.