From 56d265ae11911d06b37b05a06a939b86fe8eb1ed Mon Sep 17 00:00:00 2001 From: Matheus Pimenta Date: Tue, 25 Apr 2023 15:20:21 +0100 Subject: [PATCH] Add OCI provider option to create Helm source command Signed-off-by: Matheus Pimenta --- cmd/flux/create_source_helm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/flux/create_source_helm.go b/cmd/flux/create_source_helm.go index e55f847a..81746082 100644 --- a/cmd/flux/create_source_helm.go +++ b/cmd/flux/create_source_helm.go @@ -83,6 +83,7 @@ type sourceHelmFlags struct { keyFile string caFile string secretRef string + ociProvider string passCredentials bool } @@ -96,6 +97,7 @@ func init() { createSourceHelmCmd.Flags().StringVar(&sourceHelmArgs.keyFile, "key-file", "", "TLS authentication key file path") createSourceHelmCmd.Flags().StringVar(&sourceHelmArgs.caFile, "ca-file", "", "TLS authentication CA file path") createSourceHelmCmd.Flags().StringVarP(&sourceHelmArgs.secretRef, "secret-ref", "", "", "the name of an existing secret containing TLS, basic auth or docker-config credentials") + createSourceHelmCmd.Flags().StringVar(&sourceHelmArgs.ociProvider, "oci-provider", "", "OCI provider for authentication") createSourceHelmCmd.Flags().BoolVarP(&sourceHelmArgs.passCredentials, "pass-credentials", "", false, "pass credentials to all domains") createSourceCmd.AddCommand(createSourceHelmCmd) @@ -143,6 +145,7 @@ func createSourceHelmCmdRun(cmd *cobra.Command, args []string) error { } if url.Scheme == sourcev1.HelmRepositoryTypeOCI { helmRepository.Spec.Type = sourcev1.HelmRepositoryTypeOCI + helmRepository.Spec.Provider = sourceHelmArgs.ociProvider } if createSourceArgs.fetchTimeout > 0 {