Promote bucket commands to GA
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user