Skip to content

Commit accd476

Browse files
committed
Promote API to v2beta1
1 parent 9e3760a commit accd476

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1087
-167
lines changed

.github/workflows/e2e.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Go
2323
uses: actions/setup-go@v2-beta
2424
with:
25-
go-version: 1.14.x
25+
go-version: 1.15.x
2626
- name: Setup Kubernetes
2727
uses: engineerd/setup-kind@v0.4.0
2828
- name: Setup Helm

.github/workflows/fossa.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-go@v2
1414
with:
15-
go-version: "^1.14.x"
15+
go-version: "^1.15.x"
1616
- run: go version
1717
# Runs a set of commands to initialize and analyze with FOSSA
1818
- name: run FOSSA analysis

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Docker buildkit multi-arch build requires golang alpine
2-
FROM golang:1.14-alpine as builder
2+
FROM golang:1.15-alpine as builder
33

44
WORKDIR /workspace
55

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ manifests: controller-gen
5959

6060
# Generate API reference documentation
6161
api-docs: gen-crd-api-reference-docs
62-
$(API_REF_GEN) -api-dir=./api/v2alpha1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/helmrelease.md
62+
$(API_REF_GEN) -api-dir=./api/v2beta1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/helmrelease.md
6363

6464
# Run go fmt against code
6565
fmt:

PROJECT

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ repo: github.com/fluxcd/helm-controller
33
resources:
44
- group: helm
55
kind: HelmRelease
6-
version: v2alpha1
6+
version: v2beta1
77
version: "2"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ operator.
4444

4545
## Specifications
4646

47-
* [API](docs/spec/v2alpha1/README.md)
47+
* [API](docs/spec/v2beta1/README.md)
4848
* [Controller](docs/spec/README.md)
4949

5050
[source-controller]: https://github.com/fluxcd/source-controller

api/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/fluxcd/helm-controller/api
22

3-
go 1.14
3+
go 1.15
44

55
require (
66
github.com/fluxcd/pkg/apis/meta v0.0.2

api/v2alpha1/condition_types.go api/v2beta1/condition_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v2alpha1
17+
package v2beta1
1818

1919
const (
2020
// ReleasedCondition represents the status of the last release attempt

api/v2alpha1/doc.go api/v2beta1/doc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v2alpha1 contains API Schema definitions for the helm v2alpha1 API group
17+
// Package v2beta1 contains API Schema definitions for the helm v2beta1 API group
1818
// +kubebuilder:object:generate=true
1919
// +groupName=helm.toolkit.fluxcd.io
20-
package v2alpha1
20+
package v2beta1

api/v2alpha1/groupversion_info.go api/v2beta1/groupversion_info.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v2alpha1
17+
package v2beta1
1818

1919
import (
2020
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -23,7 +23,7 @@ import (
2323

2424
var (
2525
// GroupVersion is group version used to register these objects
26-
GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2alpha1"}
26+
GroupVersion = schema.GroupVersion{Group: "helm.toolkit.fluxcd.io", Version: "v2beta1"}
2727

2828
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
2929
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

api/v2alpha1/helmrelease_types.go api/v2beta1/helmrelease_types.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v2alpha1
17+
package v2beta1
1818

1919
import (
2020
"encoding/json"
@@ -35,7 +35,7 @@ const HelmReleaseFinalizer = "finalizers.fluxcd.io"
3535

3636
// HelmReleaseSpec defines the desired state of a Helm release.
3737
type HelmReleaseSpec struct {
38-
// Chart defines the template of the v1alpha1.HelmChart that should be created
38+
// Chart defines the template of the v1beta1.HelmChart that should be created
3939
// for this HelmRelease.
4040
// +required
4141
Chart HelmChartTemplate `json:"chart"`
@@ -155,31 +155,31 @@ func (in HelmReleaseSpec) GetUninstall() Uninstall {
155155
}
156156

157157
// HelmChartTemplate defines the template from which the controller will
158-
// generate a v1alpha1.HelmChart object in the same namespace as the referenced
159-
// v1alpha1.Source.
158+
// generate a v1beta1.HelmChart object in the same namespace as the referenced
159+
// v1beta1.Source.
160160
type HelmChartTemplate struct {
161-
// Spec holds the template for the v1alpha1.HelmChartSpec for this HelmRelease.
161+
// Spec holds the template for the v1beta1.HelmChartSpec for this HelmRelease.
162162
// +required
163163
Spec HelmChartTemplateSpec `json:"spec"`
164164
}
165165

166166
// HelmChartTemplateSpec defines the template from which the controller will
167-
// generate a v1alpha1.HelmChartSpec object.
167+
// generate a v1beta1.HelmChartSpec object.
168168
type HelmChartTemplateSpec struct {
169169
// The name or path the Helm chart is available at in the SourceRef.
170170
// +required
171171
Chart string `json:"chart"`
172172

173-
// Version semver expression, ignored for charts from v1alpha1.GitRepository and
174-
// v1alpha1.Bucket sources. Defaults to latest when omitted.
173+
// Version semver expression, ignored for charts from v1beta1.GitRepository and
174+
// v1beta1.Bucket sources. Defaults to latest when omitted.
175175
// +optional
176176
Version string `json:"version,omitempty"`
177177

178-
// The name and namespace of the v1alpha1.Source the chart is available at.
178+
// The name and namespace of the v1beta1.Source the chart is available at.
179179
// +required
180180
SourceRef CrossNamespaceObjectReference `json:"sourceRef"`
181181

182-
// Interval at which to check the v1alpha1.Source for updates. Defaults to
182+
// Interval at which to check the v1beta1.Source for updates. Defaults to
183183
// 'HelmReleaseSpec.Interval'.
184184
// +optional
185185
Interval *metav1.Duration `json:"interval,omitempty"`
@@ -190,7 +190,7 @@ type HelmChartTemplateSpec struct {
190190
ValuesFile string `json:"valuesFile,omitempty"`
191191
}
192192

193-
// GetInterval returns the configured interval for the v1alpha1.HelmChart,
193+
// GetInterval returns the configured interval for the v1beta1.HelmChart,
194194
// or the given default.
195195
func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.Duration {
196196
if in.Spec.Interval == nil {
@@ -200,7 +200,7 @@ func (in HelmChartTemplate) GetInterval(defaultInterval metav1.Duration) metav1.
200200
}
201201

202202
// GetNamespace returns the namespace targeted namespace for the
203-
// v1alpha1.HelmChart, or the given default.
203+
// v1beta1.HelmChart, or the given default.
204204
func (in HelmChartTemplate) GetNamespace(defaultNamespace string) string {
205205
if in.Spec.SourceRef.Namespace == "" {
206206
return defaultNamespace

api/v2alpha1/reference_types.go api/v2beta1/reference_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v2alpha1
17+
package v2beta1
1818

1919
// CrossNamespaceObjectReference contains enough information to let you locate
2020
// the typed referenced object at cluster level.

api/v2alpha1/zz_generated.deepcopy.go api/v2beta1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- jsonPath: .metadata.creationTimestamp
2929
name: Age
3030
type: date
31-
name: v2alpha1
31+
name: v2beta1
3232
schema:
3333
openAPIV3Schema:
3434
description: HelmRelease is the Schema for the helmreleases API
@@ -49,23 +49,23 @@ spec:
4949
description: HelmReleaseSpec defines the desired state of a Helm release.
5050
properties:
5151
chart:
52-
description: Chart defines the template of the v1alpha1.HelmChart
53-
that should be created for this HelmRelease.
52+
description: Chart defines the template of the v1beta1.HelmChart that
53+
should be created for this HelmRelease.
5454
properties:
5555
spec:
56-
description: Spec holds the template for the v1alpha1.HelmChartSpec
56+
description: Spec holds the template for the v1beta1.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 v1alpha1.Source
64+
description: Interval at which to check the v1beta1.Source
6565
for updates. Defaults to 'HelmReleaseSpec.Interval'.
6666
type: string
6767
sourceRef:
68-
description: The name and namespace of the v1alpha1.Source
68+
description: The name and namespace of the v1beta1.Source
6969
the chart is available at.
7070
properties:
7171
apiVersion:
@@ -98,8 +98,8 @@ spec:
9898
type: string
9999
version:
100100
description: Version semver expression, ignored for charts
101-
from v1alpha1.GitRepository and v1alpha1.Bucket sources.
102-
Defaults to latest when omitted.
101+
from v1beta1.GitRepository and v1beta1.Bucket sources. Defaults
102+
to latest when omitted.
103103
type: string
104104
required:
105105
- chart

config/default/kustomization.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ resources:
55
- ../crd
66
- ../rbac
77
- ../manager
8-
- github.com/fluxcd/source-controller/config//crd?ref=v0.0.15
9-
- github.com/fluxcd/source-controller/config//manager?ref=v0.0.15
8+
- github.com/fluxcd/source-controller/config//crd?ref=v0.1.0
9+
- github.com/fluxcd/source-controller/config//manager?ref=v0.1.0
1010
- namespace.yaml

config/samples/helm_v2alpha1_helmrelease_gitrepository.yaml config/samples/helm_v2beta1_helmrelease_gitrepository.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: podinfo-gitrepository

config/samples/helm_v2alpha1_helmrelease_helmrepository.yaml config/samples/helm_v2beta1_helmrelease_helmrepository.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: podinfo-helmrepository

config/samples/source_v1alpha1_gitrepository.yaml 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/v1alpha1
1+
apiVersion: source.toolkit.fluxcd.io/v1beta1
22
kind: GitRepository
33
metadata:
44
name: podinfo

config/samples/source_v1alpha1_helmrepository.yaml 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/v1alpha1
1+
apiVersion: source.toolkit.fluxcd.io/v1beta1
22
kind: HelmRepository
33
metadata:
44
name: podinfo

config/testdata/dependencies/helmrelease-backend.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: backend

config/testdata/dependencies/helmrelease-frontend.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: frontend

config/testdata/dependencies/helmrepository.yaml

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

config/testdata/install-fail-remediate/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: install-fail-remediate

config/testdata/install-fail-retry/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: install-fail-retry

config/testdata/install-fail/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: install-fail

config/testdata/install-test-fail-ignore/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: install-test-fail-ignore

config/testdata/install-test-fail/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: install-test-fail

config/testdata/podinfo/gitrepository.yaml

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

config/testdata/podinfo/helmrelease-git.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: podinfo-git

config/testdata/podinfo/helmrelease.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: podinfo

config/testdata/podinfo/helmrepository.yaml

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

config/testdata/upgrade-fail-remediate-uninstall/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-remediate-uninstall

config/testdata/upgrade-fail-remediate-uninstall/upgrade.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-remediate-uninstall

config/testdata/upgrade-fail-remediate/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-remediate

config/testdata/upgrade-fail-remediate/upgrade.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-remediate

config/testdata/upgrade-fail-retry/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-retry

config/testdata/upgrade-fail-retry/upgrade.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail-retry

config/testdata/upgrade-fail/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail

config/testdata/upgrade-fail/upgrade.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-fail

config/testdata/upgrade-test-fail/install.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: helm.toolkit.fluxcd.io/v2alpha1
1+
apiVersion: helm.toolkit.fluxcd.io/v2beta1
22
kind: HelmRelease
33
metadata:
44
name: upgrade-test-fail

0 commit comments

Comments
 (0)