Merge pull request #942 from isometry/feature/ignore-missing-values-files

Add `.spec.ignoreMissingValuesFiles` to HelmChartTemplate API
This commit is contained in:
Stefan Prodan 2024-05-03 16:13:33 +03:00 committed by GitHub
commit 739d0a9cf9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 3 deletions

View File

@ -376,6 +376,10 @@ type HelmChartTemplateSpec struct {
// +deprecated
ValuesFile string `json:"valuesFile,omitempty"`
// IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing.
// +optional
IgnoreMissingValuesFiles bool `json:"ignoreMissingValuesFiles,omitempty"`
// Verify contains the secret name containing the trusted public keys
// used to verify the signature and specifies which provider to use to check
// whether OCI image is authentic.

View File

@ -1320,6 +1320,10 @@ spec:
maxLength: 2048
minLength: 1
type: string
ignoreMissingValuesFiles:
description: IgnoreMissingValuesFiles controls whether to
silently ignore missing values files rather than failing.
type: boolean
interval:
description: |-
Interval at which to check the v1.Source for updates. Defaults to

View File

@ -807,6 +807,18 @@ ValuesFiles items. Ignored when omitted.</p>
</tr>
<tr>
<td>
<code>ignoreMissingValuesFiles</code><br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing.</p>
</td>
</tr>
<tr>
<td>
<code>verify</code><br>
<em>
<a href="#helm.toolkit.fluxcd.io/v2beta2.HelmChartTemplateVerification">
@ -999,6 +1011,18 @@ ValuesFiles items. Ignored when omitted.</p>
</tr>
<tr>
<td>
<code>ignoreMissingValuesFiles</code><br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>IgnoreMissingValuesFiles controls whether to silently ignore missing values files rather than failing.</p>
</td>
</tr>
<tr>
<td>
<code>verify</code><br>
<em>
<a href="#helm.toolkit.fluxcd.io/v2beta2.HelmChartTemplateVerification">

View File

@ -226,9 +226,10 @@ func buildHelmChartFromTemplate(obj *v2.HelmRelease) *sourcev1.HelmChart {
Name: template.Spec.SourceRef.Name,
Kind: template.Spec.SourceRef.Kind,
},
Interval: template.GetInterval(obj.Spec.Interval),
ReconcileStrategy: template.Spec.ReconcileStrategy,
ValuesFiles: template.Spec.ValuesFiles,
Interval: template.GetInterval(obj.Spec.Interval),
ReconcileStrategy: template.Spec.ReconcileStrategy,
ValuesFiles: template.Spec.ValuesFiles,
IgnoreMissingValuesFiles: template.Spec.IgnoreMissingValuesFiles,
},
}
if verifyTpl := template.Spec.Verify; verifyTpl != nil {