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 Helm Release Timeout Issue #3240

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/api_reference/v1beta2.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "v1beta2 API Reference"
date = 2024-06-05T16:21:27+03:00
date = 2024-06-18T14:12:31+01:00
weight = 11
+++
## v1beta2
Expand Down Expand Up @@ -428,7 +428,7 @@ GCESpec defines the GCE cloud provider
| releaseName | ReleaseName is [RELEASE] part of the `helm upgrade [RELEASE] [CHART]` command. Empty is defaulted to chart. | string | false |
| namespace | Namespace is --namespace flag of the `helm upgrade` command. A namespace to use for a release. | string | true |
| wait | Wait is --wait flag of the `helm install` command. | bool | false |
| timeout | WaitTimeout --timeout flag of the `helm install` command. | time.Duration | false |
| timeout | WaitTimeout --timeout flag of the `helm install` command. | metav1.Duration | false |
| values | Values provide optional overrides of the helm values. | [][HelmValues](#helmvalues) | false |

[Back to Group](#v1beta2)
Expand Down
4 changes: 2 additions & 2 deletions docs/api_reference/v1beta3.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "v1beta3 API Reference"
date = 2024-06-05T16:21:27+03:00
date = 2024-06-18T14:12:31+01:00
weight = 11
+++
## v1beta3
Expand Down Expand Up @@ -416,7 +416,7 @@ GCESpec defines the GCE cloud provider
| releaseName | ReleaseName is [RELEASE] part of the `helm upgrade [RELEASE] [CHART]` command. Empty is defaulted to chart. | string | false |
| namespace | Namespace is --namespace flag of the `helm upgrade` command. A namespace to use for a release. | string | true |
| wait | Wait is --wait flag of the `helm install` command. | bool | false |
| timeout | WaitTimeout --timeout flag of the `helm install` command. | time.Duration | false |
| timeout | WaitTimeout --timeout flag of the `helm install` command. | metav1.Duration | false |
| values | Values provide optional overrides of the helm values. | [][HelmValues](#helmvalues) | false |

[Back to Group](#v1beta3)
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/kubeone/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package kubeone

import (
"encoding/json"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -160,7 +159,7 @@ type HelmRelease struct {
Wait bool `json:"wait,omitempty"`

// WaitTimeout --timeout flag of the `helm install` command. Default to 5m
WaitTimeout time.Duration `json:"timeout,omitempty"`
WaitTimeout metav1.Duration `json:"timeout,omitempty"`

// Values provide optional overrides of the helm values.
Values []HelmValues `json:"values,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/kubeone/v1beta2/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func SetDefaults_HelmReleases(obj *KubeOneCluster) {
obj.HelmReleases[idx].ReleaseName = hr.Chart
}

if hr.WaitTimeout == 0 {
obj.HelmReleases[idx].WaitTimeout = time.Minute * 5
if hr.WaitTimeout.Duration == 0 {
obj.HelmReleases[idx].WaitTimeout.Duration = time.Minute * 5
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/kubeone/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1beta2

import (
"encoding/json"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -157,7 +156,7 @@ type HelmRelease struct {
Wait bool `json:"wait,omitempty"`

// WaitTimeout --timeout flag of the `helm install` command.
WaitTimeout time.Duration `json:"timeout,omitempty"`
WaitTimeout metav1.Duration `json:"timeout,omitempty"`

// Values provide optional overrides of the helm values.
Values []HelmValues `json:"values,omitempty"`
Expand Down
5 changes: 2 additions & 3 deletions pkg/apis/kubeone/v1beta2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/kubeone/v1beta2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pkg/apis/kubeone/v1beta3/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func SetDefaults_HelmReleases(obj *KubeOneCluster) {
obj.HelmReleases[idx].ReleaseName = hr.Chart
}

if hr.WaitTimeout == 0 {
obj.HelmReleases[idx].WaitTimeout = time.Minute * 5
if hr.WaitTimeout.Duration == 0 {
obj.HelmReleases[idx].WaitTimeout.Duration = time.Minute * 5
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/apis/kubeone/v1beta3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1beta3

import (
"encoding/json"
"time"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -157,7 +156,7 @@ type HelmRelease struct {
Wait bool `json:"wait,omitempty"`

// WaitTimeout --timeout flag of the `helm install` command.
WaitTimeout time.Duration `json:"timeout,omitempty"`
WaitTimeout metav1.Duration `json:"timeout,omitempty"`

// Values provide optional overrides of the helm values.
Values []HelmValues `json:"values,omitempty"`
Expand Down
5 changes: 2 additions & 3 deletions pkg/apis/kubeone/v1beta3/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/kubeone/v1beta3/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/kubeone/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/localhelm/helm3.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func newHelmInstallClient(cfg *helmaction.Configuration, release kubeoneapi.Helm
helmInstall.RepoURL = release.RepoURL
helmInstall.Version = release.Version
helmInstall.Wait = release.Wait
helmInstall.Timeout = release.WaitTimeout
helmInstall.Timeout = release.WaitTimeout.Duration

return helmInstall
}
Expand Down