Merge pull request #1068 from fluxcd/disable-schema-validation

Add `disableSchemaValidation` to Helm install/upgrade actions
This commit is contained in:
Stefan Prodan 2024-09-24 09:32:30 +03:00 committed by GitHub
commit 754c2ba1cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 52 additions and 0 deletions

View File

@ -451,6 +451,11 @@ type Install struct {
// +optional
DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`
// DisableSchemaValidation prevents the Helm install action from validating
// the values against the JSON Schema.
// +optional
DisableSchemaValidation bool `json:"disableSchemaValidation,omitempty"`
// Replace tells the Helm install action to re-use the 'ReleaseName', but only
// if that name is a deleted release which remains in the history.
// +optional
@ -624,6 +629,11 @@ type Upgrade struct {
// +optional
DisableOpenAPIValidation bool `json:"disableOpenAPIValidation,omitempty"`
// DisableSchemaValidation prevents the Helm upgrade action from validating
// the values against the JSON Schema.
// +optional
DisableSchemaValidation bool `json:"disableSchemaValidation,omitempty"`
// Force forces resource updates through a replacement strategy.
// +optional
Force bool `json:"force,omitempty"`

View File

@ -365,6 +365,11 @@ spec:
DisableOpenAPIValidation prevents the Helm install action from validating
rendered templates against the Kubernetes OpenAPI Schema.
type: boolean
disableSchemaValidation:
description: |-
DisableSchemaValidation prevents the Helm install action from validating
the values against the JSON Schema.
type: boolean
disableWait:
description: |-
DisableWait disables the waiting for resources to be ready after a Helm
@ -774,6 +779,11 @@ spec:
DisableOpenAPIValidation prevents the Helm upgrade action from validating
rendered templates against the Kubernetes OpenAPI Schema.
type: boolean
disableSchemaValidation:
description: |-
DisableSchemaValidation prevents the Helm upgrade action from validating
the values against the JSON Schema.
type: boolean
disableWait:
description: |-
DisableWait disables the waiting for resources to be ready after a Helm

View File

@ -1832,6 +1832,19 @@ rendered templates against the Kubernetes OpenAPI Schema.</p>
</tr>
<tr>
<td>
<code>disableSchemaValidation</code><br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>DisableSchemaValidation prevents the Helm install action from validating
the values against the JSON Schema.</p>
</td>
</tr>
<tr>
<td>
<code>replace</code><br>
<em>
bool
@ -2720,6 +2733,19 @@ rendered templates against the Kubernetes OpenAPI Schema.</p>
</tr>
<tr>
<td>
<code>disableSchemaValidation</code><br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>DisableSchemaValidation prevents the Helm upgrade action from validating
the values against the JSON Schema.</p>
</td>
</tr>
<tr>
<td>
<code>force</code><br>
<em>
bool

View File

@ -492,6 +492,8 @@ The field offers the following subfields:
from running during the installation of the chart. Defaults to `false`.
- `.disableOpenAPIValidation` (Optional): Prevents Helm from validating the
rendered templates against the Kubernetes OpenAPI Schema. Defaults to `false`.
- `.disableSchemaValidation` (Optional): Prevents Helm from validating the
values against the JSON Schema. Defaults to `false`.
- `.disableWait` (Optional): Disables waiting for resources to be ready after
the installation of the chart. Defaults to `false`.
- `.disableWaitForJobs` (Optional): Disables waiting for any Jobs to complete
@ -534,6 +536,8 @@ The field offers the following subfields:
from running during the upgrade of the release. Defaults to `false`.
- `.disableOpenAPIValidation` (Optional): Prevents Helm from validating the
rendered templates against the Kubernetes OpenAPI Schema. Defaults to `false`.
- `.disableSchemaValidation` (Optional): Prevents Helm from validating the
values against the JSON Schema. Defaults to `false`.
- `.disableWait` (Optional): Disables waiting for resources to be ready after
upgrading the release. Defaults to `false`.
- `.disableWaitForJobs` (Optional): Disables waiting for any Jobs to complete

View File

@ -72,6 +72,7 @@ func newInstall(config *helmaction.Configuration, obj *v2.HelmRelease, opts []In
install.WaitForJobs = !obj.GetInstall().DisableWaitForJobs
install.DisableHooks = obj.GetInstall().DisableHooks
install.DisableOpenAPIValidation = obj.GetInstall().DisableOpenAPIValidation
install.SkipSchemaValidation = obj.GetInstall().DisableSchemaValidation
install.Replace = obj.GetInstall().Replace
install.Devel = true
install.SkipCRDs = true

View File

@ -73,6 +73,7 @@ func newUpgrade(config *helmaction.Configuration, obj *v2.HelmRelease, opts []Up
upgrade.WaitForJobs = !obj.GetUpgrade().DisableWaitForJobs
upgrade.DisableHooks = obj.GetUpgrade().DisableHooks
upgrade.DisableOpenAPIValidation = obj.GetUpgrade().DisableOpenAPIValidation
upgrade.SkipSchemaValidation = obj.GetUpgrade().DisableSchemaValidation
upgrade.Force = obj.GetUpgrade().Force
upgrade.CleanupOnFail = obj.GetUpgrade().CleanupOnFail
upgrade.Devel = true