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

Argo-CD: configs.params.server.insecure not populating argocd-cmd-params-cm correctly #1780

Closed
rhyswilliamsza opened this issue Jan 19, 2023 · 6 comments
Labels
argo-cd bug Something isn't working documentation Improvements or additions to documentation no-issue-activity

Comments

@rhyswilliamsza
Copy link

Describe the bug

Setting:

configs:
    params:
        server:
            insecure: true

Results in the following argocd-cmd-params-cm data entry:

server: 'map[insecure:true]'

instead of

server.insecure: 'true'

Related helm chart

argo-cd

Helm chart version

5.17.4

To Reproduce

  1. Set configs.params.server.insecure to true.
  2. Observe that argocd-cmd-params-cm has server: <map> set.

Expected behavior

The resultant argocd-cmd-params-cm map should have server.insecure: true set, instead of a serialised sub-map under server.

Screenshots

No response

Additional context

No response

@rhyswilliamsza rhyswilliamsza added the bug Something isn't working label Jan 19, 2023
@mkilchhofer
Copy link
Member

mkilchhofer commented Jan 19, 2023

I think we should update our documentation and maybe add some more failure catching.
The section config.params is a flat dictionary of key: value, while a key is eg server.insecure.

If you want to set this on CLI level, you need to escape the dot:
--set configs.params."server\.insecure"=true

If you want to achieve the same behavior in a YAML-style values, then you need to use:

configs:
  params:
    server.insecure: true

@rhyswilliamsza
Copy link
Author

I think we should update our documentation and maybe add some more failure catching. The section config.params is a flat dictionary of key: value, while a key is eg server.insecure.

If you want to set this on CLI level, you need to escape the dot: --set configs.params."server\.insecure"=true

If you want to achieve the same behavior in a YAML-style values, then you need to use:

configs:
  params:
    server.insecure: true

Ah, right! That makes sense.

We rolled this chart out using a separate instance of argo-cd. We needed to escape the param key to get it to pick up correctly. Thanks for the help!

configs:
  params:
    "server.insecure": true

@pdrastil
Copy link
Member

@mkilchhofer I've tried to improve this but I don't believe this has a simple solution as we are trying to bypass Helm strong typing. When user provides values as --set configs.params.server.insecure=true the .Values will contain following structure:

config:
  params:
     # default value
     server.insecure: false
     # user provided
     server:
       insecure: true

If you flatten such structure you get 2 duplicate keys with different values:

config:
  params:
     server.insecure: false
     server.insecure: true

So most reasonable would be to just update our documentation.

@pdrastil pdrastil added argo-cd documentation Improvements or additions to documentation labels Jan 20, 2023
@kolja-lucht
Copy link

How can I get this working with terraform?

We're installing the argocd Helm chart with the helm_release resource from the Helm provider and set a few additional paramters via set blocks.
They all work fine, except configs.params."server.insecure". This is what I tried (based on the comments above):

  set {
    name  = "configs.params.\"server\\.insecure\""
    value = "true"
  }

Terraform doesn't throw any errors when updating the resource, but the ConfigMap doesn't get updated and still shows server.insecure=false.

@dgnemo
Copy link

dgnemo commented Feb 16, 2023

I don't remember where I found the documentation explaining this escaping, but this it the config we are using successfully:

  set {
    # Run server without TLS
    name  = "configs.params.server\\.insecure"
    value = true
  }

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
argo-cd bug Something isn't working documentation Improvements or additions to documentation no-issue-activity
Projects
None yet
Development

No branches or pull requests

5 participants