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

Support specifying externalTrafficPolicy in Services created by listener-operator #562

Closed
wants to merge 3 commits into from

Conversation

sbernauer
Copy link
Member

@sbernauer sbernauer commented Mar 5, 2023

Description

Needed by stackabletech/listener-operator#57

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@sbernauer sbernauer force-pushed the feat/listener-service-external-traffic-policy branch from d6dde1f to ec74d04 Compare March 5, 2023 18:39
nightkr
nightkr previously approved these changes Aug 7, 2023
src/commons/listener.rs Outdated Show resolved Hide resolved
src/commons/listener.rs Outdated Show resolved Hide resolved
@@ -35,6 +35,38 @@ pub enum ServiceType {
ClusterIP,
}

impl ServiceType {
pub fn to_kubernetes_literal(&self) -> String {
match self {
Copy link

Choose a reason for hiding this comment

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

🚫 [clippy] reported by reviewdog 🐶

error[E0004]: non-exhaustive patterns: `&commons::listener::ServiceType::ClusterIP` not covered
  --> src/commons/listener.rs:40:15
   |
40 |         match self {
   |               ^^^^ pattern `&commons::listener::ServiceType::ClusterIP` not covered
   |
note: `commons::listener::ServiceType` defined here
  --> src/commons/listener.rs:35:5
   |
29 | pub enum ServiceType {
   |          -----------
...
35 |     ClusterIP,
   |     ^^^^^^^^^ not covered
   = note: the matched value is of type `&commons::listener::ServiceType`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
42 ~             ServiceType::LoadBalancer => "LoadBalancer".to_string(),
43 ~             &commons::listener::ServiceType::ClusterIP => todo!(),
   |

@@ -35,6 +35,38 @@ pub enum ServiceType {
ClusterIP,
}

impl ServiceType {
pub fn to_kubernetes_literal(&self) -> String {
match self {
Copy link

Choose a reason for hiding this comment

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

🚫 [clippy] reported by reviewdog 🐶

error[E0004]: non-exhaustive patterns: `&commons::listener::ServiceType::ClusterIP` not covered
  --> src/commons/listener.rs:40:15
   |
40 |         match self {
   |               ^^^^ pattern `&commons::listener::ServiceType::ClusterIP` not covered
   |
note: `commons::listener::ServiceType` defined here
  --> src/commons/listener.rs:35:5
   |
29 | pub enum ServiceType {
   |          -----------
...
35 |     ClusterIP,
   |     ^^^^^^^^^ not covered
   = note: the matched value is of type `&commons::listener::ServiceType`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
   |
42 ~             ServiceType::LoadBalancer => "LoadBalancer".to_string(),
43 ~             &commons::listener::ServiceType::ClusterIP => todo!(),
   |

@sbernauer
Copy link
Member Author

Superseded by #773

@sbernauer sbernauer closed this May 6, 2024
@sbernauer sbernauer deleted the feat/listener-service-external-traffic-policy branch May 6, 2024 16:59
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