mirror of
https://github.com/fluxcd/flux2.git
synced 2026-04-27 05:38:50 +00:00
Upgrade fluxcd/pkg auth, oci, git and git/gogit
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
parent
0a64800784
commit
ac66adc24c
9 changed files with 47 additions and 96 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue