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

Expose the new metrics port in the all-pods service #489

Merged
merged 1 commit into from
Jan 27, 2023

Conversation

adutra
Copy link
Contributor

@adutra adutra commented Jan 27, 2023

What this PR does:
Exposes the 9000 port in 2 services: DC and all-pods.

Which issue(s) this PR fixes:
Fixes #488

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

@adutra adutra requested a review from a team as a code owner January 27, 2023 11:24
},
},
dcServicePorts: []int32{8080, 9000, 9042, 9103, 9142, 9160},
allPodsServicePorts: []int32{8080, 9000, 9042, 9103},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder: shouldn't all-pods service expose the same ports as the dc service? But I didn't want to change that in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

it depends what the all-ports service is used for.
If no one expressed any requirement around that, I agree we shouldn't change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I understand the all-pods service is identical to the dc service, but also includes pods not ready. So it's not suitable to be used as a contact point for the drivers, but it is useful for metrics for instance. Maybe that's the reason why it doesn't expose so many ports. That said, following this logic it shouldn't expose 9042 either. Anyways 🤷‍♂️

Copy link
Contributor

Choose a reason for hiding this comment

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

cass-operator sets allPods as the ServiceName for all pods to ensure that they get DNS working correctly. Using only the dcPods would make the DNS names fail in certain cases:

#18

},
},
},
// FIXME: 9004 should be in the list of open ports
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is interesting: I copied this test from TestPorts, but I realized that if the user changes a managed port at container level, the change is not reflected at service level.

},
},
dcServicePorts: []int32{8080, 9000, 9042, 9103, 9142, 9160},
allPodsServicePorts: []int32{8080, 9000, 9042, 9103},
Copy link
Contributor

Choose a reason for hiding this comment

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

it depends what the all-ports service is used for.
If no one expressed any requirement around that, I agree we shouldn't change it.

@adutra adutra merged commit 1d21f8f into k8ssandra:master Jan 27, 2023
@adutra adutra deleted the service-metrics branch January 27, 2023 13:07
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.

Expose the new metrics port in services
3 participants