Skip to content

Commit f16e5f0

Browse files
committed
Promote API to v1beta1
1 parent 3f2f4d5 commit f16e5f0

Some content is hidden

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

52 files changed

+1244
-131
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/[email protected]
2828
- name: Setup Kustomize

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
@@ -52,7 +52,7 @@ manifests: controller-gen
5252

5353
# Generate API reference documentation
5454
api-docs: gen-crd-api-reference-docs
55-
$(API_REF_GEN) -api-dir=./api/v1alpha1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/source.md
55+
$(API_REF_GEN) -api-dir=./api/v1beta1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/source.md
5656

5757
# Run go fmt against code
5858
fmt:

PROJECT

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ repo: github.com/fluxcd/source-controller
33
resources:
44
- group: source
55
kind: GitRepository
6-
version: v1alpha1
6+
version: v1beta1
77
- group: source
88
kind: HelmRepository
9-
version: v1alpha1
9+
version: v1beta1
1010
- group: source
1111
kind: HelmChart
12-
version: v1alpha1
12+
version: v1beta1
1313
- group: source
1414
kind: Bucket
15-
version: v1alpha1
15+
version: v1beta1
1616
version: "2"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
[![release](https://img.shields.io/github/release/fluxcd/source-controller/all.svg)](https://github.com/fluxcd/source-controller/releases)
77

88
The source-controller is a Kubernetes operator, specialised in artifacts acquisition
9-
from external sources such as Git and Helm repositories.
9+
from external sources such as Git, Helm repositories and S3 buckets.
1010
The source-controller implements the
11-
[source.toolkit.fluxcd.io](https://github.com/fluxcd/source-controller/tree/master/docs/spec/v1alpha1) API
11+
[source.toolkit.fluxcd.io](https://github.com/fluxcd/source-controller/tree/master/docs/spec/v1beta1) API
1212
and is a core component of the [GitOps toolkit](https://toolkit.fluxcd.io).
1313

1414
![overview](docs/diagrams/source-controller-overview.png)

api/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/fluxcd/source-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/v1alpha1/artifact_types.go api/v1beta1/artifact_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 v1alpha1
17+
package v1beta1
1818

1919
import (
2020
"path"

api/v1alpha1/bucket_types.go api/v1beta1/bucket_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 v1alpha1
17+
package v1beta1
1818

1919
import (
2020
"time"

api/v1alpha1/condition_types.go api/v1beta1/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 v1alpha1
17+
package v1beta1
1818

1919
const SourceFinalizer = "finalizers.fluxcd.io"
2020

api/v1alpha1/doc.go api/v1beta1/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 v1alpha1 contains API Schema definitions for the source v1alpha1 API group
17+
// Package v1beta1 contains API Schema definitions for the source v1beta1 API group
1818
// +kubebuilder:object:generate=true
1919
// +groupName=source.toolkit.fluxcd.io
20-
package v1alpha1
20+
package v1beta1

api/v1alpha1/gitrepository_types.go api/v1beta1/gitrepository_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 v1alpha1
17+
package v1beta1
1818

1919
import (
2020
"time"

api/v1alpha1/groupversion_info.go api/v1beta1/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 v1alpha1
17+
package v1beta1
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: "source.toolkit.fluxcd.io", Version: "v1alpha1"}
26+
GroupVersion = schema.GroupVersion{Group: "source.toolkit.fluxcd.io", Version: "v1beta1"}
2727

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

api/v1alpha1/helmchart_types.go api/v1beta1/helmchart_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 v1alpha1
17+
package v1beta1
1818

1919
import (
2020
"github.com/fluxcd/pkg/apis/meta"

api/v1alpha1/helmrepository_types.go api/v1beta1/helmrepository_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 v1alpha1
17+
package v1beta1
1818

1919
import (
2020
"time"

api/v1alpha1/source.go api/v1beta1/source.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package v1alpha1
1+
package v1beta1
22

33
import (
44
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

api/v1alpha1/zz_generated.deepcopy.go api/v1beta1/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/source.toolkit.fluxcd.io_buckets.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
- jsonPath: .metadata.creationTimestamp
3030
name: Age
3131
type: date
32-
name: v1alpha1
32+
name: v1beta1
3333
schema:
3434
openAPIV3Schema:
3535
description: Bucket is the Schema for the buckets API

config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
- jsonPath: .metadata.creationTimestamp
3030
name: Age
3131
type: date
32-
name: v1alpha1
32+
name: v1beta1
3333
schema:
3434
openAPIV3Schema:
3535
description: GitRepository is the Schema for the gitrepositories API

config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
- jsonPath: .metadata.creationTimestamp
3939
name: Age
4040
type: date
41-
name: v1alpha1
41+
name: v1beta1
4242
schema:
4343
openAPIV3Schema:
4444
description: HelmChart is the Schema for the helmcharts API

config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ spec:
2929
- jsonPath: .metadata.creationTimestamp
3030
name: Age
3131
type: date
32-
name: v1alpha1
32+
name: v1beta1
3333
schema:
3434
openAPIV3Schema:
3535
description: HelmRepository is the Schema for the helmrepositories API

config/samples/source_v1alpha1_bucket.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: Bucket
33
metadata:
44
name: bucket-sample

config/samples/source_v1alpha1_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: gitrepository-sample

config/samples/source_v1alpha1_helmchart_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: HelmChart
33
metadata:
44
name: helmchart-git-sample

config/samples/source_v1alpha1_helmchart_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: HelmChart
33
metadata:
44
name: helmchart-sample

config/samples/source_v1alpha1_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: helmrepository-sample

config/testdata/bucket/source.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: source.toolkit.fluxcd.io/v1alpha1
2+
apiVersion: source.toolkit.fluxcd.io/v1beta1
33
kind: Bucket
44
metadata:
55
name: podinfo

config/testdata/helmchart-from-bucket/source.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
apiVersion: source.toolkit.fluxcd.io/v1alpha1
2+
apiVersion: source.toolkit.fluxcd.io/v1beta1
33
kind: Bucket
44
metadata:
55
name: charts
@@ -13,7 +13,7 @@ spec:
1313
secretRef:
1414
name: minio-credentials
1515
---
16-
apiVersion: source.toolkit.fluxcd.io/v1alpha1
16+
apiVersion: source.toolkit.fluxcd.io/v1beta1
1717
kind: HelmChart
1818
metadata:
1919
name: helmchart-bucket

config/testdata/helmchart-valuesfile/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: bitnami-charts

config/testdata/helmchart-valuesfile/helmchart_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: HelmChart
33
metadata:
44
name: mariadb-git

config/testdata/helmchart-valuesfile/helmchart_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: HelmChart
33
metadata:
44
name: mariadb

config/testdata/helmchart-valuesfile/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: bitnami-charts

controllers/bucket_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import (
4242
"github.com/fluxcd/pkg/recorder"
4343
"github.com/fluxcd/pkg/runtime/predicates"
4444

45-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
45+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4646
)
4747

4848
// BucketReconciler reconciles a Bucket object
@@ -315,7 +315,7 @@ func (r *BucketReconciler) checksum(root string) (string, error) {
315315
return fmt.Sprintf("%x", sha1.Sum([]byte(checksum))), nil
316316
}
317317

318-
// resetStatus returns a modified v1alpha1.Bucket and a boolean indicating
318+
// resetStatus returns a modified v1beta1.Bucket and a boolean indicating
319319
// if the status field has been reset.
320320
func (r *BucketReconciler) resetStatus(bucket sourcev1.Bucket) (sourcev1.Bucket, bool) {
321321
// We do not have an artifact, or it does no longer exist

controllers/gitrepository_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
"github.com/fluxcd/pkg/recorder"
4141
"github.com/fluxcd/pkg/runtime/predicates"
4242

43-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
43+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4444
"github.com/fluxcd/source-controller/pkg/git"
4545
)
4646

@@ -274,7 +274,7 @@ func (r *GitRepositoryReconciler) verify(ctx context.Context, publicKeySecret ty
274274
return nil
275275
}
276276

277-
// resetStatus returns a modified v1alpha1.GitRepository and a boolean indicating
277+
// resetStatus returns a modified v1beta1.GitRepository and a boolean indicating
278278
// if the status field has been reset.
279279
func (r *GitRepositoryReconciler) resetStatus(repository sourcev1.GitRepository) (sourcev1.GitRepository, bool) {
280280
// We do not have an artifact, or it does no longer exist

controllers/gitrepository_controller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import (
4141

4242
"github.com/fluxcd/pkg/gittestserver"
4343

44-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
44+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4545
)
4646

4747
var _ = Describe("GitRepositoryReconciler", func() {

controllers/helmchart_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444
"github.com/fluxcd/pkg/runtime/predicates"
4545
"github.com/fluxcd/pkg/untar"
4646

47-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
47+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4848
"github.com/fluxcd/source-controller/internal/helm"
4949
)
5050

@@ -474,7 +474,7 @@ func (r *HelmChartReconciler) reconcileFromTarballArtifact(ctx context.Context,
474474
return sourcev1.HelmChartReady(chart, newArtifact, cUrl, sourcev1.ChartPackageSucceededReason, message), nil
475475
}
476476

477-
// resetStatus returns a modified v1alpha1.HelmChart and a boolean indicating
477+
// resetStatus returns a modified v1beta1.HelmChart and a boolean indicating
478478
// if the status field has been reset.
479479
func (r *HelmChartReconciler) resetStatus(chart sourcev1.HelmChart) (sourcev1.HelmChart, bool) {
480480
// We do not have an artifact, or it does no longer exist

controllers/helmchart_controller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import (
4545
"k8s.io/apimachinery/pkg/types"
4646
"sigs.k8s.io/yaml"
4747

48-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
48+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4949
)
5050

5151
var _ = Describe("HelmChartReconciler", func() {

controllers/helmrepository_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import (
4040
"github.com/fluxcd/pkg/recorder"
4141
"github.com/fluxcd/pkg/runtime/predicates"
4242

43-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
43+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
4444
"github.com/fluxcd/source-controller/internal/helm"
4545
)
4646

@@ -248,7 +248,7 @@ func (r *HelmRepositoryReconciler) reconcile(ctx context.Context, repository sou
248248
return sourcev1.HelmRepositoryReady(repository, artifact, indexURL, sourcev1.IndexationSucceededReason, message), nil
249249
}
250250

251-
// resetStatus returns a modified v1alpha1.HelmRepository and a boolean indicating
251+
// resetStatus returns a modified v1beta1.HelmRepository and a boolean indicating
252252
// if the status field has been reset.
253253
func (r *HelmRepositoryReconciler) resetStatus(repository sourcev1.HelmRepository) (sourcev1.HelmRepository, bool) {
254254
// We do not have an artifact, or it does no longer exist

controllers/helmrepository_controller_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232

3333
"github.com/fluxcd/pkg/helmtestserver"
3434

35-
sourcev1 "github.com/fluxcd/source-controller/api/v1alpha1"
35+
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
3636
)
3737

3838
var _ = Describe("HelmRepositoryReconciler", func() {

0 commit comments

Comments
 (0)