-
Notifications
You must be signed in to change notification settings - Fork 345
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
Fixed issue with deployment template #1762
Fixed issue with deployment template #1762
Conversation
hey @xogoodnow |
Hi @AndrewChubatiuk, on version: 0.12.5 just re created the issue to be sure: steps I took: # -- Extra Volumes for the pod
extraVolumes:
- name: example
configMap:
name: example
# -- Extra Volume Mounts for the container
extraVolumeMounts:
- name: example
mountPath: /example
ps: obviously I had to add a datasource and an alert to the values.yaml then render the template helm template vmalert victoria-metrics-alert/ -n monitoring --dry-run here is the result: volumeMounts:
- name: alerts-config
mountPath: /config
- mountPath: /example
name: example
volumes:
- name: alerts-config
configMap:
name: vmalert-victoria-metrics-alert-server-alert-rules-config
- configMap:
name: example
name: example as you can see the volumes and volumeMounts section are wrong. Cheers |
what's wrong in this result?
|
This results the deployment to be stuck in "in progress" state and the relatives pods would be stuck in "creating container" status. |
order makes no difference |
have you checked kubectl events for more information? |
The parameters "- configMap" or "-mountPath" have no meaning in a k8s manifest. so when it is applied and sent to API server it does not know what to do with it and it just gets stuck. I think you did not understand my point. The first one is "-name" and then comes the "- mountPath" |
This is wrong: volumeMounts:
- name: alerts-config
mountPath: /config
- mountPath: /example
name: example
volumes:
- name: alerts-config
configMap:
name: vmalert-victoria-metrics-alert-server-alert-rules-config
- configMap:
name: example
name: example
This is correct: volumeMounts:
- name: alerts-config
mountPath: /config
- name: example
mountPath: /example
volumes:
- name: alerts-config
configMap:
name: vmalert-victoria-metrics-alert-server-alert-rules-config
- name: example
configMap:
name: example |
both
and
produce the same map, order is not important |
I ran the test without any pipelines and in fact you are right.
|
|
The current template does not render extra volumes properly with the given values
here is the section for values.yaml
here is the rendered manifest in the previous template:
here is the rendered version in the corrected template: