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

Docs: Update Dex config, change misleading error message. #11208

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

EladLeev
Copy link

@EladLeev EladLeev commented Nov 6, 2022

Signed-off-by: Elad Leev eladleev@gmail.com

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Description:
Hi :)
Creating this PR to update some of the Dex documentation, and to change a misleading error message on ReplaceStringSecret.

Dex changes:

  • The part-of label is missing from the Secret example, so it won't be associate it with Argo.
  • Explicitly specify that we are using the OIDC account details, and not the service-account details.
  • Mention that setting the URL is used to enable Dex.

Log changes:

  • Mention the annotation as part of the log. Without it, it's a bit misleading, as it seems that the secret was loaded properly, but the key is missing from it, wrong, or need to be escaped.

Thanks! 💪

Signed-off-by: Elad Leev <eladleev@gmail.com>
@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (918e19e) 49.73% compared to head (f8a28a9) 49.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11208      +/-   ##
==========================================
- Coverage   49.73%   49.72%   -0.01%     
==========================================
  Files         261      261              
  Lines       44705    44705              
==========================================
- Hits        22234    22231       -3     
- Misses      20284    20286       +2     
- Partials     2187     2188       +1     
Impacted Files Coverage Δ
util/settings/settings.go 51.09% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -182,6 +182,8 @@ Go through the same steps as in [OpenID Connect using Dex](#openid-connect-using
apiVersion: v1
kind: Secret
metadata:
labels:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @EladLeev Can you please explain what was the impact of not having this before ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking a look at this PR @iam-veeramalla!

Without this label, ArgoCD won't consider this secret as part of ArgoCD, and won't read it at all.
Correct me if I'm wrong, but using this label, argo select and parse related secrets.
Without it, Argo will just use the default secret (argocd-secret).

This also relates to the rest of the changes that I've made - when this label is absent, and you are referring to a different secret (using $<k8s_secret_name>:<key>) the error that you'll get is -

config referenced '%s', but the key does not exist in secret

Which is a bit misleading as you are not really reading that secret and not finding the key.

side note: I think that it's better to add validations and a custom errors when referring to a secret that is not labelled, but I didn't want to make too many changes to settings.go on my first contribution 😅

Copy link
Member

@iam-veeramalla iam-veeramalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you adding this manually today in your setup ?

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

Successfully merging this pull request may close these issues.

2 participants