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: support exporter custom port #728

Merged
merged 6 commits into from
Dec 17, 2023

Conversation

drivebyer
Copy link
Collaborator

Description

When use hostnetwork, we need to specify exporter port to avoid port conflict too. Like redis custom port in #723

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

Signed-off-by: drivebyer <[email protected]>
@drivebyer drivebyer added the enhancement New feature or request label Dec 15, 2023
@drivebyer drivebyer enabled auto-merge (squash) December 15, 2023 15:11
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

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

Comparison is base (692c4ac) 29.21% compared to head (a0c5cd0) 29.43%.

Files Patch % Lines
k8sutils/redis-cluster.go 0.00% 14 Missing and 1 partial ⚠️
k8sutils/redis-replication.go 0.00% 12 Missing ⚠️
k8sutils/redis-sentinel.go 0.00% 12 Missing ⚠️
k8sutils/redis-standalone.go 0.00% 12 Missing ⚠️
k8sutils/statefulset.go 33.33% 7 Missing and 1 partial ⚠️
k8sutils/services.go 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   29.21%   29.43%   +0.21%     
==========================================
  Files          18       19       +1     
  Lines        3135     3170      +35     
==========================================
+ Hits          916      933      +17     
- Misses       2191     2207      +16     
- Partials       28       30       +2     

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

drivebyer and others added 3 commits December 15, 2023 23:19
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]>
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

Comment on lines 10 to 14
if r.Spec.RedisExporter != nil {
if r.Spec.RedisExporter.Port == nil {
r.Spec.RedisExporter.Port = pointer.Int(9121)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if r.Spec.RedisExporter != nil {
if r.Spec.RedisExporter.Port == nil {
r.Spec.RedisExporter.Port = pointer.Int(9121)
}
}
if r.Spec.RedisExporter != nil && r.Spec.RedisExporter.Port == nil {
r.Spec.RedisExporter.Port = pointer.Int(9121)
}

@drivebyer drivebyer merged commit 62d79b8 into OT-CONTAINER-KIT:master Dec 17, 2023
20 of 21 checks passed
@drivebyer drivebyer deleted the exporter-custom-port branch December 18, 2023 02:03
mattrobinsonsre pushed a commit to mattrobinsonsre/redis-operator that referenced this pull request Jul 11, 2024
* support exporter custom port

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