Skip to content

feat: rediscluster support hostnetwork and custom port#723

Merged
drivebyer merged 21 commits intoOT-CONTAINER-KIT:masterfrom
drivebyer:hostnetwork
Dec 13, 2023
Merged

feat: rediscluster support hostnetwork and custom port#723
drivebyer merged 21 commits intoOT-CONTAINER-KIT:masterfrom
drivebyer:hostnetwork

Conversation

@drivebyer
Copy link
Copy Markdown
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

Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
@drivebyer drivebyer enabled auto-merge (squash) December 12, 2023 09:21
Signed-off-by: drivebyer <yang.wu@daocloud.io>
@codecov
Copy link
Copy Markdown

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 <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
@drivebyer drivebyer added the enhancement New feature or request label Dec 12, 2023
@shubham-cmyk
Copy link
Copy Markdown
Member

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

@drivebyer
Copy link
Copy Markdown
Collaborator Author

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

Sure, see Additional Context of current PR.

@shubham-cmyk
Copy link
Copy Markdown
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 <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
Signed-off-by: drivebyer <yang.wu@daocloud.io>
@drivebyer drivebyer changed the title feat: rediscluster support hostnetwork && custom port feat: rediscluster support hostnetwork and custom port Dec 13, 2023
@drivebyer
Copy link
Copy Markdown
Collaborator Author

@shubham-cmyk ready now

drivebyer and others added 6 commits December 13, 2023 22:18
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Signed-off-by: Shubham Gupta <iamshubhamgupta2001@gmail.com>
Copy link
Copy Markdown
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
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 <yang.wu@daocloud.io>

* replace with custom port

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* service custom port

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* make default to 6379 when reconcile old cluster

Signed-off-by: drivebyer <yang.wu@daocloud.io>

* add e2e

Signed-off-by: drivebyer <yang.wu@daocloud.io>

---------

Signed-off-by: drivebyer <yang.wu@daocloud.io>
@drivebyer drivebyer deleted the hostnetwork branch December 14, 2023 02:00
@drivebyer drivebyer mentioned this pull request Dec 15, 2023
4 tasks
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