Added support for helm waitForJobs
Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Added support for helm waitForJobs Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Minor fixes Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Changed WaitForJobs to DisableWaitForJobs Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Minor fixes Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Changed WaitForJobs to DisableWaitForJobs Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com> Removed unnecessary update to v2alpha1 Signed-off-by: Santosh Kewat <santoshkewat.bitmesra@gmail.com>
This commit is contained in:
parent
261fc6bda1
commit
f48b8ab953
|
@ -319,6 +319,11 @@ type Install struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// install has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm install action.
|
// DisableHooks prevents hooks from running during the Helm install action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
@ -490,6 +495,11 @@ type Upgrade struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// upgrade has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm upgrade action.
|
// DisableHooks prevents hooks from running during the Helm upgrade action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
@ -686,6 +696,11 @@ type Rollback struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// rollback has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm rollback action.
|
// DisableHooks prevents hooks from running during the Helm rollback action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
|
|
@ -178,6 +178,10 @@ spec:
|
||||||
description: DisableWait disables the waiting for resources to
|
description: DisableWait disables the waiting for resources to
|
||||||
be ready after a Helm install has been performed.
|
be ready after a Helm install has been performed.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
disableWaitForJobs:
|
||||||
|
description: DisableWaitForJobs disables waiting for jobs to complete
|
||||||
|
after a Helm install has been performed.
|
||||||
|
type: boolean
|
||||||
remediation:
|
remediation:
|
||||||
description: Remediation holds the remediation configuration for
|
description: Remediation holds the remediation configuration for
|
||||||
when the Helm install action for the HelmRelease fails. The
|
when the Helm install action for the HelmRelease fails. The
|
||||||
|
@ -393,6 +397,10 @@ spec:
|
||||||
description: DisableWait disables the waiting for resources to
|
description: DisableWait disables the waiting for resources to
|
||||||
be ready after a Helm rollback has been performed.
|
be ready after a Helm rollback has been performed.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
disableWaitForJobs:
|
||||||
|
description: DisableWaitForJobs disables waiting for jobs to complete
|
||||||
|
after a Helm rollback has been performed.
|
||||||
|
type: boolean
|
||||||
force:
|
force:
|
||||||
description: Force forces resource updates through a replacement
|
description: Force forces resource updates through a replacement
|
||||||
strategy.
|
strategy.
|
||||||
|
@ -509,6 +517,10 @@ spec:
|
||||||
description: DisableWait disables the waiting for resources to
|
description: DisableWait disables the waiting for resources to
|
||||||
be ready after a Helm upgrade has been performed.
|
be ready after a Helm upgrade has been performed.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
disableWaitForJobs:
|
||||||
|
description: DisableWaitForJobs disables waiting for jobs to complete
|
||||||
|
after a Helm upgrade has been performed.
|
||||||
|
type: boolean
|
||||||
force:
|
force:
|
||||||
description: Force forces resource updates through a replacement
|
description: Force forces resource updates through a replacement
|
||||||
strategy.
|
strategy.
|
||||||
|
|
|
@ -1169,6 +1169,19 @@ install has been performed.</p>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
<code>disableWaitForJobs</code><br>
|
||||||
|
<em>
|
||||||
|
bool
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<em>(Optional)</em>
|
||||||
|
<p>DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
install has been performed.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<code>disableHooks</code><br>
|
<code>disableHooks</code><br>
|
||||||
<em>
|
<em>
|
||||||
bool
|
bool
|
||||||
|
@ -1526,6 +1539,19 @@ rollback has been performed.</p>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
<code>disableWaitForJobs</code><br>
|
||||||
|
<em>
|
||||||
|
bool
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<em>(Optional)</em>
|
||||||
|
<p>DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
rollback has been performed.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<code>disableHooks</code><br>
|
<code>disableHooks</code><br>
|
||||||
<em>
|
<em>
|
||||||
bool
|
bool
|
||||||
|
@ -1767,6 +1793,19 @@ upgrade has been performed.</p>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
<code>disableWaitForJobs</code><br>
|
||||||
|
<em>
|
||||||
|
bool
|
||||||
|
</em>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<em>(Optional)</em>
|
||||||
|
<p>DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
upgrade has been performed.</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
<code>disableHooks</code><br>
|
<code>disableHooks</code><br>
|
||||||
<em>
|
<em>
|
||||||
bool
|
bool
|
||||||
|
|
|
@ -190,6 +190,11 @@ type Install struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// install has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm install action.
|
// DisableHooks prevents hooks from running during the Helm install action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
@ -280,6 +285,11 @@ type Upgrade struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// upgrade has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm upgrade action.
|
// DisableHooks prevents hooks from running during the Helm upgrade action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
@ -383,6 +393,11 @@ type Rollback struct {
|
||||||
// +optional
|
// +optional
|
||||||
DisableWait bool `json:"disableWait,omitempty"`
|
DisableWait bool `json:"disableWait,omitempty"`
|
||||||
|
|
||||||
|
// DisableWaitForJobs disables waiting for jobs to complete after a Helm
|
||||||
|
// rollback has been performed.
|
||||||
|
// +optional
|
||||||
|
DisableWaitForJobs bool `json:"disableWaitForJobs,omitempty"`
|
||||||
|
|
||||||
// DisableHooks prevents hooks from running during the Helm rollback action.
|
// DisableHooks prevents hooks from running during the Helm rollback action.
|
||||||
// +optional
|
// +optional
|
||||||
DisableHooks bool `json:"disableHooks,omitempty"`
|
DisableHooks bool `json:"disableHooks,omitempty"`
|
||||||
|
@ -770,6 +785,9 @@ kubectl get all --all-namespaces \
|
||||||
For install, upgrade, and rollback actions resource waiting is enabled by default,
|
For install, upgrade, and rollback actions resource waiting is enabled by default,
|
||||||
but can be disabled by setting `spec.<action>.disableWait`.
|
but can be disabled by setting `spec.<action>.disableWait`.
|
||||||
|
|
||||||
|
Waiting for jobs to complete is enabled by default,
|
||||||
|
but can be disabled by setting `spec.<action>.disableWaitForJobs`.
|
||||||
|
|
||||||
### `HelmRelease` dependencies
|
### `HelmRelease` dependencies
|
||||||
|
|
||||||
When applying a `HelmRelease`, you may need to make sure other releases are [Ready](#status)
|
When applying a `HelmRelease`, you may need to make sure other releases are [Ready](#status)
|
||||||
|
|
|
@ -106,6 +106,7 @@ func (r *Runner) Install(hr v2.HelmRelease, chart *chart.Chart, values chartutil
|
||||||
install.Namespace = hr.GetReleaseNamespace()
|
install.Namespace = hr.GetReleaseNamespace()
|
||||||
install.Timeout = hr.Spec.GetInstall().GetTimeout(hr.GetTimeout()).Duration
|
install.Timeout = hr.Spec.GetInstall().GetTimeout(hr.GetTimeout()).Duration
|
||||||
install.Wait = !hr.Spec.GetInstall().DisableWait
|
install.Wait = !hr.Spec.GetInstall().DisableWait
|
||||||
|
install.WaitForJobs = !hr.Spec.GetInstall().DisableWaitForJobs
|
||||||
install.DisableHooks = hr.Spec.GetInstall().DisableHooks
|
install.DisableHooks = hr.Spec.GetInstall().DisableHooks
|
||||||
install.DisableOpenAPIValidation = hr.Spec.GetInstall().DisableOpenAPIValidation
|
install.DisableOpenAPIValidation = hr.Spec.GetInstall().DisableOpenAPIValidation
|
||||||
install.Replace = hr.Spec.GetInstall().Replace
|
install.Replace = hr.Spec.GetInstall().Replace
|
||||||
|
@ -156,6 +157,7 @@ func (r *Runner) Upgrade(hr v2.HelmRelease, chart *chart.Chart, values chartutil
|
||||||
upgrade.MaxHistory = hr.GetMaxHistory()
|
upgrade.MaxHistory = hr.GetMaxHistory()
|
||||||
upgrade.Timeout = hr.Spec.GetUpgrade().GetTimeout(hr.GetTimeout()).Duration
|
upgrade.Timeout = hr.Spec.GetUpgrade().GetTimeout(hr.GetTimeout()).Duration
|
||||||
upgrade.Wait = !hr.Spec.GetUpgrade().DisableWait
|
upgrade.Wait = !hr.Spec.GetUpgrade().DisableWait
|
||||||
|
upgrade.WaitForJobs = !hr.Spec.GetUpgrade().DisableWaitForJobs
|
||||||
upgrade.DisableHooks = hr.Spec.GetUpgrade().DisableHooks
|
upgrade.DisableHooks = hr.Spec.GetUpgrade().DisableHooks
|
||||||
upgrade.Force = hr.Spec.GetUpgrade().Force
|
upgrade.Force = hr.Spec.GetUpgrade().Force
|
||||||
upgrade.CleanupOnFail = hr.Spec.GetUpgrade().CleanupOnFail
|
upgrade.CleanupOnFail = hr.Spec.GetUpgrade().CleanupOnFail
|
||||||
|
@ -353,6 +355,7 @@ func (r *Runner) Rollback(hr v2.HelmRelease) error {
|
||||||
rollback := action.NewRollback(r.config)
|
rollback := action.NewRollback(r.config)
|
||||||
rollback.Timeout = hr.Spec.GetRollback().GetTimeout(hr.GetTimeout()).Duration
|
rollback.Timeout = hr.Spec.GetRollback().GetTimeout(hr.GetTimeout()).Duration
|
||||||
rollback.Wait = !hr.Spec.GetRollback().DisableWait
|
rollback.Wait = !hr.Spec.GetRollback().DisableWait
|
||||||
|
rollback.WaitForJobs = !hr.Spec.GetRollback().DisableWaitForJobs
|
||||||
rollback.DisableHooks = hr.Spec.GetRollback().DisableHooks
|
rollback.DisableHooks = hr.Spec.GetRollback().DisableHooks
|
||||||
rollback.Force = hr.Spec.GetRollback().Force
|
rollback.Force = hr.Spec.GetRollback().Force
|
||||||
rollback.Recreate = hr.Spec.GetRollback().Recreate
|
rollback.Recreate = hr.Spec.GetRollback().Recreate
|
||||||
|
|
Loading…
Reference in New Issue