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: rediscluster support hostnetwork and custom port #723

Merged
merged 21 commits into from
Dec 13, 2023

Conversation

drivebyer
Copy link
Collaborator

@drivebyer drivebyer commented Dec 12, 2023

Description

Support hostnetwork for redis cluster mode.

ps: only support with clusterVersion: v6. Because we can not connect to hostnetwork pod with FQDN name

#183

Type of change

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

Checklist

  • Tests have been added/modified and all tests pass.
  • 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

Here are test case:

  1. create cluster:
截屏2023-12-12 18 14 57 2. check cluster: 截屏2023-12-12 18 15 33 3. cluster cluster out of k8s: 截屏2023-12-12 18 17 45

@drivebyer drivebyer enabled auto-merge (squash) December 12, 2023 09:21
Signed-off-by: drivebyer <[email protected]>
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 40 lines in your changes are missing coverage. Please review.

Comparison is base (1e22658) 27.79% compared to head (2946c6b) 29.21%.
Report is 1 commits behind head on master.

Files Patch % Lines
k8sutils/cluster-scaling.go 0.00% 16 Missing ⚠️
k8sutils/statefulset.go 46.15% 6 Missing and 1 partial ⚠️
k8sutils/redis-cluster.go 40.00% 3 Missing ⚠️
k8sutils/redis-replication.go 0.00% 3 Missing ⚠️
k8sutils/redis-sentinel.go 0.00% 3 Missing ⚠️
k8sutils/redis-standalone.go 0.00% 3 Missing ⚠️
k8sutils/redis.go 75.00% 2 Missing ⚠️
k8sutils/services.go 60.00% 2 Missing ⚠️
controllers/rediscluster_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #723      +/-   ##
==========================================
+ Coverage   27.79%   29.21%   +1.42%     
==========================================
  Files          18       18              
  Lines        3123     3135      +12     
==========================================
+ Hits          868      916      +48     
+ Misses       2228     2191      -37     
- Partials       27       28       +1     

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

…R-KIT/redis-operator/pkg/util

Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
@drivebyer drivebyer added the enhancement New feature or request label Dec 12, 2023
@shubham-cmyk
Copy link
Member

@drivebyer Does this solves the issue for the connecting outside ?

@drivebyer
Copy link
Collaborator Author

@drivebyer Does this solves the issue for the connecting outside ?

Sure, see Additional Context of current PR.

@shubham-cmyk
Copy link
Member

@drivebyer Does this solves the issue for the connecting outside ?

Sure, see Additional Context of current PR.

Looks Good.

drivebyer and others added 5 commits December 12, 2023 22:36
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
@drivebyer drivebyer changed the title feat: rediscluster support hostnetwork && custom port feat: rediscluster support hostnetwork and custom port Dec 13, 2023
@drivebyer
Copy link
Collaborator Author

@shubham-cmyk ready now

drivebyer and others added 6 commits December 13, 2023 22:18
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: drivebyer <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Signed-off-by: Shubham Gupta <[email protected]>
Copy link
Member

@shubham-cmyk shubham-cmyk left a comment

Choose a reason for hiding this comment

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

LGTM

@drivebyer drivebyer merged commit adca068 into OT-CONTAINER-KIT:master Dec 13, 2023
25 checks passed
shubham-cmyk pushed a commit to shubham-cmyk/redis-operator that referenced this pull request Dec 13, 2023
…IT#723)

* add cr filed, default port to 6379

Signed-off-by: drivebyer <[email protected]>

* replace with custom port

Signed-off-by: drivebyer <[email protected]>

* service custom port

Signed-off-by: drivebyer <[email protected]>

* make default to 6379 when reconcile old cluster

Signed-off-by: drivebyer <[email protected]>

* add e2e

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>
@drivebyer drivebyer deleted the hostnetwork branch December 14, 2023 02:00
@drivebyer drivebyer mentioned this pull request Dec 15, 2023
4 tasks
mattrobinsonsre pushed a commit to mattrobinsonsre/redis-operator that referenced this pull request Jul 11, 2024
…IT#723)

* add cr filed, default port to 6379

Signed-off-by: drivebyer <[email protected]>

* replace with custom port

Signed-off-by: drivebyer <[email protected]>

* service custom port

Signed-off-by: drivebyer <[email protected]>

* make default to 6379 when reconcile old cluster

Signed-off-by: drivebyer <[email protected]>

* add e2e

Signed-off-by: drivebyer <[email protected]>

---------

Signed-off-by: drivebyer <[email protected]>
Signed-off-by: Matt Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants