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

feat: Add Redis SSL support. Fixes #4688 #6742

Merged
merged 2 commits into from
Jul 21, 2021
Merged

Conversation

eyusupov
Copy link
Contributor

@eyusupov eyusupov commented Jul 16, 2021

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).

This is similar to #4689, but adds more options to support various scenarios menitioned in the original PR:

  1. insecure tls:
    --redis argocd-redis:6379 --redis-use-tls --redis-insecure-skip-tls-verify

  2. self-signed cert on redis server
    --redis argocd-redis:6379 --redis-use-tls --redis-ca-certificate /home/argocd/redis-tls/tls.crt --redis-client-certificate /home/argocd/redis-client-tls/tls.crt --redis-client-key /home/argocd/redis-client-tls/tls.key

  3. private ca:
    --redis argocd-redis:6379 --redis-use-tls --redis-ca-certificate /home/argocd/ca/tls.crt --redis-client-certificate /home/argocd/redis-client-tls/tls.crt --redis-client-key /home/argocd/redis-client-tls/tls.key

  4. system ca:
    --redis argocd-redis:6379 --redis-use-tls --redis-client-certificate /home/argocd/redis-client-tls/tls.crt --redis-client-key /home/argocd/redis-client-tls/tls.key

Looking into updating tests and the docs

@eyusupov eyusupov changed the title Add Redis SSL support. Fixes #4688 feat: Add Redis SSL support. Fixes #4688 Jul 16, 2021
@eyusupov eyusupov force-pushed the redis-url branch 2 times, most recently from 5728442 to 58f2670 Compare July 16, 2021 13:39
Signed-off-by: Eldar Yusupov <eyusupov@gmail.com>
@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #6742 (f0c3145) into master (30d2ba1) will decrease coverage by 0.39%.
The diff coverage is 37.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6742      +/-   ##
==========================================
- Coverage   41.30%   40.90%   -0.40%     
==========================================
  Files         156      157       +1     
  Lines       20702    20957     +255     
==========================================
+ Hits         8550     8573      +23     
- Misses      10944    11170     +226     
- Partials     1208     1214       +6     
Impacted Files Coverage Δ
util/cache/cache.go 56.96% <37.50%> (-13.26%) ⬇️
server/server.go 53.90% <0.00%> (-1.06%) ⬇️
util/db/cluster.go 59.52% <0.00%> (-0.48%) ⬇️
util/helm/cmd.go 29.87% <0.00%> (-0.37%) ⬇️
server/cluster/cluster.go 17.54% <0.00%> (-0.32%) ⬇️
pkg/apis/application/v1alpha1/types.go 57.71% <0.00%> (-0.18%) ⬇️
controller/cache/cache.go 10.62% <0.00%> (-0.12%) ⬇️
cmd/argocd/commands/login.go 2.31% <0.00%> (-0.12%) ⬇️
cmd/argocd/commands/root.go 2.08% <0.00%> (-0.10%) ⬇️
util/kube/portforwarder.go 0.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30d2ba1...f0c3145. Read the comment docs.

Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

Thank you @eyusupov ! Added minor comment about linter errors.

Additionally can you add keys for new redis commands to argocd-cmd-params-cm ConfigMap

@@ -9,9 +9,12 @@ import (

"github.com/go-redis/redis/v8"
"github.com/spf13/cobra"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix linter error. The following command should do it:

goimports -local github.com/argoproj/argo-cd -w util/cache/cache.go

Copy link
Collaborator

Choose a reason for hiding this comment

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

To save time reformatted the file and pushed it to your fork.

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
@alexmt alexmt merged commit 2497679 into argoproj:master Jul 21, 2021
@alexmt alexmt self-assigned this Jul 28, 2021
@alexmt alexmt added the needs-verification PR requires pre-release verification label Jul 28, 2021
@alexmt alexmt added this to the v2.1 milestone Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-verification PR requires pre-release verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants