1
0
mirror of synced 2026-02-06 19:05:55 +00:00

Promote bucket commands to GA

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2024-09-27 16:33:47 +03:00
parent 0d101e0e36
commit c7daf6466f
23 changed files with 72 additions and 73 deletions

View File

@@ -21,12 +21,11 @@ import (
"strings"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/fluxcd/flux2/v2/internal/utils"
)
var supportedHelmChartSourceKinds = []string{sourcev1.HelmRepositoryKind, sourcev1.GitRepositoryKind, sourcev1b2.BucketKind}
var supportedHelmChartSourceKinds = []string{sourcev1.HelmRepositoryKind, sourcev1.GitRepositoryKind, sourcev1.BucketKind}
type HelmChartSource struct {
Kind string

View File

@@ -26,7 +26,7 @@ import (
"github.com/fluxcd/flux2/v2/internal/utils"
)
var supportedKustomizationSourceKinds = []string{sourcev1b2.OCIRepositoryKind, sourcev1.GitRepositoryKind, sourcev1b2.BucketKind}
var supportedKustomizationSourceKinds = []string{sourcev1b2.OCIRepositoryKind, sourcev1.GitRepositoryKind, sourcev1.BucketKind}
type KustomizationSource struct {
Kind string

View File

@@ -20,15 +20,16 @@ import (
"fmt"
"strings"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
"github.com/fluxcd/flux2/v2/internal/utils"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
)
var supportedSourceBucketProviders = []string{
sourcev1.GenericBucketProvider,
sourcev1.AmazonBucketProvider,
sourcev1.AzureBucketProvider,
sourcev1.GoogleBucketProvider,
sourcev1.BucketProviderGeneric,
sourcev1.BucketProviderAmazon,
sourcev1.BucketProviderAzure,
sourcev1.BucketProviderGoogle,
}
type SourceBucketProvider string

View File

@@ -22,7 +22,7 @@ package flags
import (
"testing"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
)
func TestSourceBucketProvider_Set(t *testing.T) {
@@ -32,7 +32,7 @@ func TestSourceBucketProvider_Set(t *testing.T) {
expect string
expectErr bool
}{
{"supported", sourcev1.GenericBucketProvider, sourcev1.GenericBucketProvider, false},
{"supported", sourcev1.BucketProviderGeneric, sourcev1.BucketProviderGeneric, false},
{"unsupported", "unsupported", "", true},
{"empty", "", "", true},
}