Skip to content

feat: exporter connect to redis with TLS URI#902

Merged
drivebyer merged 2 commits intoOT-CONTAINER-KIT:masterfrom
wkd-woo:feature/tls-with-redis-exporter
Apr 29, 2024
Merged

feat: exporter connect to redis with TLS URI#902
drivebyer merged 2 commits intoOT-CONTAINER-KIT:masterfrom
wkd-woo:feature/tls-with-redis-exporter

Conversation

@wkd-woo
Copy link
Copy Markdown
Contributor

@wkd-woo wkd-woo commented Apr 29, 2024

Description

$kubectl get pod/redis-replication-0 -o yaml

...
    - name: REDIS_ADDR
      value: rediss://localhost:6379
    - name: REDIS_EXPORTER_SKIP_TLS_VERIFICATION
      value: "true"
    - name: REDIS_EXPORTER_TLS_CA_CERT_FILE
      value: /tls/ca.crt
    - name: REDIS_EXPORTER_TLS_CLIENT_CERT_FILE
      value: /tls/tls.crt
    - name: REDIS_EXPORTER_TLS_CLIENT_KEY_FILE
      value: /tls/tls.key
...

In order for the TLS-applied redis-server and exporter to communicate, the URI to which the exporter accesses the redis-server must be changed.

redis://<REDIS-SERVER> -> rediss://<REDIS-SERVER>


This is what redis exporter README description describes. Please refer to below.


image

https://github.com/oliver006/redis_exporter?tab=readme-ov-file#command-line-flags


@shubham-cmyk @drivebyer
Please consider merging these pull requests, thank you always.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • Tests have been added/modified and all tests pass. : I did my e2e tests.
  • Functionality/bugs have been confirmed to be unchanged or fixed.
  • I have performed a self-review of my own code.
  • Documentation has been updated or added where necessary.

Additional Context

image

After I added this feature, the exporter can connect to TLS-enabled redis-server and makes metrics.

wkd-woo added 2 commits April 29, 2024 15:09
Signed-off-by: wkd-woo <wkdwoos@gmail.com>
…wkd-woo/redis-operator into feature/tls-with-redis-exporter

Signed-off-by: wkd-woo <wkdwoos@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 39.93%. Comparing base (d121d86) to head (d605650).
Report is 35 commits behind head on master.

Files Patch % Lines
k8sutils/statefulset.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #902      +/-   ##
==========================================
+ Coverage   35.20%   39.93%   +4.73%     
==========================================
  Files          19       19              
  Lines        3213     2662     -551     
==========================================
- Hits         1131     1063      -68     
+ Misses       2015     1528     -487     
- Partials       67       71       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wkd-woo wkd-woo changed the title feat: TLS with redis exporter feat: exporter connect to redis with TLS URI Apr 29, 2024
@drivebyer drivebyer enabled auto-merge (squash) April 29, 2024 07:10
@drivebyer drivebyer merged commit 9cd2ae9 into OT-CONTAINER-KIT:master Apr 29, 2024
@drivebyer
Copy link
Copy Markdown
Collaborator

nice!

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