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

Upgrade fluxcd/pkg auth, oci, git and git/gogit

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
Matheus Pimenta
2025-05-04 22:48:22 +01:00
parent 0a64800784
commit ac66adc24c
9 changed files with 47 additions and 96 deletions

View File

@@ -21,7 +21,6 @@ import (
"strings"
"github.com/fluxcd/flux2/v2/internal/utils"
"github.com/fluxcd/pkg/oci"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
)
@@ -32,13 +31,6 @@ var supportedSourceOCIProviders = []string{
sourcev1.GoogleOCIProvider,
}
var sourceOCIProvidersToOCIProvider = map[string]oci.Provider{
sourcev1.GenericOCIProvider: oci.ProviderGeneric,
sourcev1.AmazonOCIProvider: oci.ProviderAWS,
sourcev1.AzureOCIProvider: oci.ProviderAzure,
sourcev1.GoogleOCIProvider: oci.ProviderGCP,
}
type SourceOCIProvider string
func (p *SourceOCIProvider) String() string {
@@ -68,12 +60,3 @@ func (p *SourceOCIProvider) Description() string {
strings.Join(supportedSourceOCIProviders, ", "),
)
}
func (p *SourceOCIProvider) ToOCIProvider() (oci.Provider, error) {
value, ok := sourceOCIProvidersToOCIProvider[p.String()]
if !ok {
return 0, fmt.Errorf("no mapping between source OCI provider %s and OCI provider", p.String())
}
return value, nil
}