From 2e71c718ce2047c06b7054d9482b1fd99509b21c Mon Sep 17 00:00:00 2001 From: Somtochi Onyekwere Date: Mon, 3 Apr 2023 19:11:48 +0100 Subject: [PATCH] update internal flags Signed-off-by: Somtochi Onyekwere --- internal/flags/helm_chart_source.go | 5 +++-- internal/flags/kustomization_source.go | 5 +++-- internal/flags/kustomization_source_test.go | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/internal/flags/helm_chart_source.go b/internal/flags/helm_chart_source.go index f257f199..2a910d02 100644 --- a/internal/flags/helm_chart_source.go +++ b/internal/flags/helm_chart_source.go @@ -20,12 +20,13 @@ import ( "fmt" "strings" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" + sourcev1 "github.com/fluxcd/source-controller/api/v1" + sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/fluxcd/flux2/internal/utils" ) -var supportedHelmChartSourceKinds = []string{sourcev1.HelmRepositoryKind, sourcev1.GitRepositoryKind, sourcev1.BucketKind} +var supportedHelmChartSourceKinds = []string{sourcev1b2.HelmRepositoryKind, sourcev1.GitRepositoryKind, sourcev1b2.BucketKind} type HelmChartSource struct { Kind string diff --git a/internal/flags/kustomization_source.go b/internal/flags/kustomization_source.go index f3455b25..6342bf68 100644 --- a/internal/flags/kustomization_source.go +++ b/internal/flags/kustomization_source.go @@ -20,12 +20,13 @@ import ( "fmt" "strings" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" + sourcev1 "github.com/fluxcd/source-controller/api/v1" + sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/fluxcd/flux2/internal/utils" ) -var supportedKustomizationSourceKinds = []string{sourcev1.OCIRepositoryKind, sourcev1.GitRepositoryKind, sourcev1.BucketKind} +var supportedKustomizationSourceKinds = []string{sourcev1b2.OCIRepositoryKind, sourcev1.GitRepositoryKind, sourcev1b2.BucketKind} type KustomizationSource struct { Kind string diff --git a/internal/flags/kustomization_source_test.go b/internal/flags/kustomization_source_test.go index f2a398c4..68b81f54 100644 --- a/internal/flags/kustomization_source_test.go +++ b/internal/flags/kustomization_source_test.go @@ -23,7 +23,7 @@ import ( "fmt" "testing" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" + sourcev1 "github.com/fluxcd/source-controller/api/v1" ) func TestKustomizationSource_Set(t *testing.T) {