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
Timeout Helm deployment > 300 seconds failed #3604
Comments
As Antonio mentioned on slack, this was an arg to the kubeops service (but was not exposed in the chart). We need to make it an arg to the kubeapps-apis service as a generic timeout that plugins may or may not obey, and pass it to the helm plugin for now. |
Just for the record, as mentioned in slack, I guess we should:
PRs are welcomed :) |
I'm trying to come up with an implementation for this :)
But I'm struggling with the step in between, that is, passing the actual timeout value to the plugin, so that it is available upon each of the operations. Would it make sense to pass an additional param that would contain plugin-level common values (like timeout for operations) when registering plugins? Here. It would be kept at the server level, and thus accesible from all operations in the plugin. |
What you're pointing out is something interesting and we really need. I mean, passing arbitrary plugin-level config in runtime is essential for our plugins to run. What about extending this struct with a Of course, another alternative is using ENV vars as we were doing at the beginning of the development. |
Yes, the idea there is that we users can add pluginConfig in the values here: https://github.com/kubeapps/kubeapps/blob/master/chart/kubeapps/values.yaml#L1602 and then each plugin is responsible for parsing that (and failing if validation fails for the plugins config) when the plugin is registered (the path to the config is passed to the plugin). So it won't be going via the cobra command (well, only in the sense that the pluginconfiguration path is passed in this way). Thanks for raising the issue clearly Rafa! |
Ok, at first I thought that timeout would be a generic CLI arg that plugins may honor or not. Thanks @antgamdia @absoludity ! |
It seems that it is only caused by using hooks which take too long (>300 seconds by default). How to reproduce
apiVersion: batch/v1
kind: Job
metadata:
name: "{{.Release.Name}}"
labels:
app.kubernetes.io/managed-by: {{.Release.Service | quote }}
app.kubernetes.io/instance: {{.Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": pre-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: "{{.Release.Name}}"
labels:
app.kubernetes.io/managed-by: {{.Release.Service | quote }}
app.kubernetes.io/instance: {{.Release.Name | quote }}
helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
spec:
restartPolicy: Never
containers:
- name: pre-install-job
image: "alpine:3.3"
command: ["/bin/sleep","{{default "10" .Values.sleepyTime}}"]
|
Yes - I guess because helm just creates the resources (without --wait), unless a hook is defined that needs to run (to completion) before the resources are created (or after), to be considered successful.
Do you mean when installing a chart without hooks? So with the hook, the create/update can be affected and this is the use-case originally reported? Sorry, just confused by the last statement. |
No, it happens in any case. Timeout always applies to hooks, even when not using This is the flow that Helm uses (at least for installing):
In other words:
Sorry, maybe I'm entangling the explanation 😅 |
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
* Added timeout parameter for Helm operations (#3604) Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com> * Finalising Helm timeout tests (#3604) Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com> * Finalising Helm timeout tests (#3604) Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com> * Finalising Helm timeout tests (#3604) Signed-off-by: Rafa Castelblanque <rcastelblanq@vmware.com>
Description:
I want to install an Helm Chart that takes more than 300 seconds to deploy.
Steps to reproduce the issue:
Describe the results you received:
Describe the results you expected:
It could be great if we can change this default behavior.
Additional information you deem important (e.g. issue happens only occasionally):
I use a custom Helm Chart I've made. When I add the following annotations, it won't wait until the end of deployment.
Version of Helm, Kubeapps and Kubernetes:
helm version
:helm list -n <kubeapps-namespace> <kubeapps-release-name>
:kubectl version
:The text was updated successfully, but these errors were encountered: