Skip to content

Commit 0f96971

Browse files
committed
Update configs with SC v1beta2 APIs
Signed-off-by: Sunny <darkowlzz@protonmail.com>
1 parent 21e5970 commit 0f96971

File tree

7 files changed

+35
-35
lines changed

7 files changed

+35
-35
lines changed

api/v2beta1/helmrelease_types.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ type PostRenderer struct {
5959

6060
// HelmReleaseSpec defines the desired state of a Helm release.
6161
type HelmReleaseSpec struct {
62-
// Chart defines the template of the v1beta1.HelmChart that should be created
62+
// Chart defines the template of the v1beta2.HelmChart that should be created
6363
// for this HelmRelease.
6464
// +required
6565
Chart HelmChartTemplate `json:"chart"`
@@ -216,32 +216,32 @@ type KubeConfig struct {
216216
}
217217

218218
// HelmChartTemplate defines the template from which the controller will
219-
// generate a v1beta1.HelmChart object in the same namespace as the referenced
220-
// v1beta1.Source.
219+
// generate a v1beta2.HelmChart object in the same namespace as the referenced
220+
// v1beta2.Source.
221221
type HelmChartTemplate struct {
222-
// Spec holds the template for the v1beta1.HelmChartSpec for this HelmRelease.
222+
// Spec holds the template for the v1beta2.HelmChartSpec for this HelmRelease.
223223
// +required
224224
Spec HelmChartTemplateSpec `json:"spec"`
225225
}
226226

227227
// HelmChartTemplateSpec defines the template from which the controller will
228-
// generate a v1beta1.HelmChartSpec object.
228+
// generate a v1beta2.HelmChartSpec object.
229229
type HelmChartTemplateSpec struct {
230230
// The name or path the Helm chart is available at in the SourceRef.
231231
// +required
232232
Chart string `json:"chart"`
233233

234-
// Version semver expression, ignored for charts from v1beta1.GitRepository and
235-
// v1beta1.Bucket sources. Defaults to latest when omitted.
234+
// Version semver expression, ignored for charts from v1beta2.GitRepository and
235+
// v1beta2.Bucket sources. Defaults to latest when omitted.
236236
// +kubebuilder:default:=*
237237
// +optional
238238
Version string `json:"version,omitempty"`
239239

240-
// The name and namespace of the v1beta1.Source the chart is available at.
240+
// The name and namespace of the v1beta2.Source the chart is available at.
241241
// +required
242242
SourceRef CrossNamespaceObjectReference `json:"sourceRef"`
243243

244-
// Interval at which to check the v1beta1.Source for updates. Defaults to
244+
// Interval at which to check the v1beta2.Source for updates. Defaults to
245245
// 'HelmReleaseSpec.Interval'.
246246
// +optional
247247
Interval *metav1.Duration `json:"interval,omitempty"`
@@ -271,7 +271,7 @@ type HelmChartTemplateSpec struct {
271271
ValuesFile string `json:"valuesFile,omitempty"`
272272
}
273273

274-
// GetInterval returns the configured interval for the v1beta1.HelmChart,
274+
// GetInterval returns the configured interval for the v1beta2.HelmChart,
275275
// or the given default.
276276
func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.Duration {
277277
if in.Spec.Interval == nil {
@@ -281,7 +281,7 @@ func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.
281281
}
282282

283283
// GetNamespace returns the namespace targeted namespace for the
284-
// v1beta1.HelmChart, or the given default.
284+
// v1beta2.HelmChart, or the given default.
285285
func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string {
286286
if in.Spec.SourceRef.Namespace == "" {
287287
return defaultNamespace

config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ spec:
4949
description: HelmReleaseSpec defines the desired state of a Helm release.
5050
properties:
5151
chart:
52-
description: Chart defines the template of the v1beta1.HelmChart that
52+
description: Chart defines the template of the v1beta2.HelmChart that
5353
should be created for this HelmRelease.
5454
properties:
5555
spec:
56-
description: Spec holds the template for the v1beta1.HelmChartSpec
56+
description: Spec holds the template for the v1beta2.HelmChartSpec
5757
for this HelmRelease.
5858
properties:
5959
chart:
6060
description: The name or path the Helm chart is available
6161
at in the SourceRef.
6262
type: string
6363
interval:
64-
description: Interval at which to check the v1beta1.Source
64+
description: Interval at which to check the v1beta2.Source
6565
for updates. Defaults to 'HelmReleaseSpec.Interval'.
6666
type: string
6767
reconcileStrategy:
@@ -75,7 +75,7 @@ spec:
7575
- Revision
7676
type: string
7777
sourceRef:
78-
description: The name and namespace of the v1beta1.Source
78+
description: The name and namespace of the v1beta2.Source
7979
the chart is available at.
8080
properties:
8181
apiVersion:
@@ -120,7 +120,7 @@ spec:
120120
version:
121121
default: '*'
122122
description: Version semver expression, ignored for charts
123-
from v1beta1.GitRepository and v1beta1.Bucket sources. Defaults
123+
from v1beta2.GitRepository and v1beta2.Bucket sources. Defaults
124124
to latest when omitted.
125125
type: string
126126
required:

config/samples/source_v1beta1_gitrepository.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: source.toolkit.fluxcd.io/v1beta1
1+
apiVersion: source.toolkit.fluxcd.io/v1beta2
22
kind: GitRepository
33
metadata:
44
name: podinfo

config/samples/source_v1beta1_helmrepository.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: source.toolkit.fluxcd.io/v1beta1
1+
apiVersion: source.toolkit.fluxcd.io/v1beta2
22
kind: HelmRepository
33
metadata:
44
name: podinfo

config/testdata/charts/crds/bootstrap/templates/git-repository.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: source.toolkit.fluxcd.io/v1beta1
2+
apiVersion: source.toolkit.fluxcd.io/v1beta2
33
kind: GitRepository
44
metadata:
55
name: this
@@ -13,4 +13,4 @@ spec:
1313
{{- end}}
1414
{{- if .Values.branch }}
1515
tag: "{{ .Values.tag }}"
16-
{{- end}}
16+
{{- end}}

config/testdata/sources/gitrepository.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: source.toolkit.fluxcd.io/v1beta1
1+
apiVersion: source.toolkit.fluxcd.io/v1beta2
22
kind: GitRepository
33
metadata:
44
name: podinfo

docs/api/helmrelease.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ HelmChartTemplate
7878
</em>
7979
</td>
8080
<td>
81-
<p>Chart defines the template of the v1beta1.HelmChart that should be created
81+
<p>Chart defines the template of the v1beta2.HelmChart that should be created
8282
for this HelmRelease.</p>
8383
</td>
8484
</tr>
@@ -438,8 +438,8 @@ string
438438
<a href="#helm.toolkit.fluxcd.io/v2beta1.HelmReleaseSpec">HelmReleaseSpec</a>)
439439
</p>
440440
<p>HelmChartTemplate defines the template from which the controller will
441-
generate a v1beta1.HelmChart object in the same namespace as the referenced
442-
v1beta1.Source.</p>
441+
generate a v1beta2.HelmChart object in the same namespace as the referenced
442+
v1beta2.Source.</p>
443443
<div class="md-typeset__scrollwrap">
444444
<div class="md-typeset__table">
445445
<table>
@@ -460,7 +460,7 @@ HelmChartTemplateSpec
460460
</em>
461461
</td>
462462
<td>
463-
<p>Spec holds the template for the v1beta1.HelmChartSpec for this HelmRelease.</p>
463+
<p>Spec holds the template for the v1beta2.HelmChartSpec for this HelmRelease.</p>
464464
<br/>
465465
<br/>
466466
<table>
@@ -484,8 +484,8 @@ string
484484
</td>
485485
<td>
486486
<em>(Optional)</em>
487-
<p>Version semver expression, ignored for charts from v1beta1.GitRepository and
488-
v1beta1.Bucket sources. Defaults to latest when omitted.</p>
487+
<p>Version semver expression, ignored for charts from v1beta2.GitRepository and
488+
v1beta2.Bucket sources. Defaults to latest when omitted.</p>
489489
</td>
490490
</tr>
491491
<tr>
@@ -498,7 +498,7 @@ CrossNamespaceObjectReference
498498
</em>
499499
</td>
500500
<td>
501-
<p>The name and namespace of the v1beta1.Source the chart is available at.</p>
501+
<p>The name and namespace of the v1beta2.Source the chart is available at.</p>
502502
</td>
503503
</tr>
504504
<tr>
@@ -512,7 +512,7 @@ Kubernetes meta/v1.Duration
512512
</td>
513513
<td>
514514
<em>(Optional)</em>
515-
<p>Interval at which to check the v1beta1.Source for updates. Defaults to
515+
<p>Interval at which to check the v1beta2.Source for updates. Defaults to
516516
&lsquo;HelmReleaseSpec.Interval&rsquo;.</p>
517517
</td>
518518
</tr>
@@ -575,7 +575,7 @@ ValuesFiles items. Ignored when omitted.</p>
575575
<a href="#helm.toolkit.fluxcd.io/v2beta1.HelmChartTemplate">HelmChartTemplate</a>)
576576
</p>
577577
<p>HelmChartTemplateSpec defines the template from which the controller will
578-
generate a v1beta1.HelmChartSpec object.</p>
578+
generate a v1beta2.HelmChartSpec object.</p>
579579
<div class="md-typeset__scrollwrap">
580580
<div class="md-typeset__table">
581581
<table>
@@ -606,8 +606,8 @@ string
606606
</td>
607607
<td>
608608
<em>(Optional)</em>
609-
<p>Version semver expression, ignored for charts from v1beta1.GitRepository and
610-
v1beta1.Bucket sources. Defaults to latest when omitted.</p>
609+
<p>Version semver expression, ignored for charts from v1beta2.GitRepository and
610+
v1beta2.Bucket sources. Defaults to latest when omitted.</p>
611611
</td>
612612
</tr>
613613
<tr>
@@ -620,7 +620,7 @@ CrossNamespaceObjectReference
620620
</em>
621621
</td>
622622
<td>
623-
<p>The name and namespace of the v1beta1.Source the chart is available at.</p>
623+
<p>The name and namespace of the v1beta2.Source the chart is available at.</p>
624624
</td>
625625
</tr>
626626
<tr>
@@ -634,7 +634,7 @@ Kubernetes meta/v1.Duration
634634
</td>
635635
<td>
636636
<em>(Optional)</em>
637-
<p>Interval at which to check the v1beta1.Source for updates. Defaults to
637+
<p>Interval at which to check the v1beta2.Source for updates. Defaults to
638638
&lsquo;HelmReleaseSpec.Interval&rsquo;.</p>
639639
</td>
640640
</tr>
@@ -714,7 +714,7 @@ HelmChartTemplate
714714
</em>
715715
</td>
716716
<td>
717-
<p>Chart defines the template of the v1beta1.HelmChart that should be created
717+
<p>Chart defines the template of the v1beta2.HelmChart that should be created
718718
for this HelmRelease.</p>
719719
</td>
720720
</tr>

0 commit comments

Comments
 (0)