Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment variables LOVELY_HELM_REPO_ADD_PARAMS throwing Error: helm repo add requires 2 arguments #249

Closed
samirpatry opened this issue Aug 11, 2023 · 4 comments

Comments

@samirpatry
Copy link

Hi
want to use helm with kustomization with a private helm repo which require authentication hence add evn LOVELY_HELM_REPO_ADD_PARAMS to handle this but getting error as below. Example will really help.

image:
docker pull ghcr.io/crumbhole/argocd-lovely-plugin-cmp:ab87458a41ae4583d54f89fe8c08eb214177616d

time="2023-08-11T19:09:30Z" level=error msg="argocd-lovely-plugin failed exit status 1: 2023/08/11 19:09:30 exit status 1: Error: "helm repo add" requires 2 arguments\n\nUsage: helm repo add [NAME] [URL] [flags]" execID=48c03
time="2023-08-11T19:09:30Z" level=error msg="finished streaming call with code Unknown" error="error generating manifests: argocd-lovely-plugin failed exit status 1: 2023/08/11 19:09:30 exit status 1: Error: "helm repo add" requires 2 arguments\n\nUsage: helm repo add [NAME] [URL] [flags]" grpc.code=Unknown grpc.method=GenerateManifest grpc.service=plugin.ConfigManagementPluginService grpc.start_time="2023-08-11T19:09:28Z" grpc.time_ms=1307.654 span.kind=server system=grpc
time="2023-08-11T19:13:59Z" level=info msg="Alloc=7713 TotalAlloc=130720 Sys=46445 NumGC=17 Goroutines=7"

At Argocd-ui application

plugin:
name: argocd-lovely-plugin
env:
- name: LOVELY_HELM_REPO_ADD_PARAMS
value: >-
helm repo add common-helm-virtual-dev
https://artifactory.local.com:443/artifactory/common-helm-virtual-dev
--insecure-skip-tls-verify --username user@local.com --password
AKCp8mZwPxNkmhdSUbKQxx9urBCjR26a2tbtuFT89sKXUtLcSKJ8EqyeFo9YPEQMpWja4x56D

At Repo-server Deployment environment

@Joibel
Copy link
Contributor

Joibel commented Aug 11, 2023

These are extra parameters to helm repo add, so try just doing the bit from --insecure-skip-verify onwards.

@samirpatry
Copy link
Author

samirpatry commented Aug 11, 2023

Tried manually inside the container as well.

helm repo add common-helm-virtual-dev https://artifactory.local.com:443/artifactory/common-helm-virtual-dev --insecure-skip-tls-verify $HELM_CONFIG_HOME=/tmp/

Error: "helm repo add" requires 2 arguments

Usage: helm repo add [NAME] [URL] [flags]

Note: HELM_CONFIG_HOME is required since $HOME is empty, the / folder will be used

Can some help me how argocd-lovely-plugin is expecting the command ? how to pass Space separated extra parameters to Helm repo add ?

  - name: lovely_helm_repo_add_params
    title: Helm Repo Add Parameters
    tooltip: **Space separated extra parameters to Helm repo add** as you might use on the command line. You’re on your own here if you pass rubbish parameters. --insecure-skip-tls-verify if your helm chart is on an insecure HTTPS server.

@samirpatry
Copy link
Author

  • AKCp8mZwPxNkmhdSUbKQxx9urBCjR26a2tbtuFT89sKXUtLcSKJ8EqyeFo9YPEQMpWja4x56D

Now its fine after removing the command and keeping only extra part.

plugin:
name: argocd-lovely-plugin
env:
- name: LOVELY_HELM_REPO_ADD_PARAMS
value: >-
--insecure-skip-tls-verify --username user@local.com
--password
AKCp8mZwPxNkmhdSUbKQxx9urBCjR26a2tbtuFT89sKXUtLcSKJ8EqyeFo9YPEQMpWja4x56D

It will be great if some sample also be there as part of documentation.

Thank you for this Lovely things. argocd-lovely ROCKS !!!

@tico24
Copy link
Collaborator

tico24 commented Aug 12, 2023

It will be great if some sample also be there as part of documentation.

We will gladly accept a Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants