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

Remove IngressRouteTCP and IngressRoute for Stopped Instances #1067

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

ianstanton
Copy link
Contributor

@ianstanton ianstanton commented Dec 11, 2024

  • Re-introduce Remove IngressRouteTCP for Stopped Instances #1058, which removes IngressRouteTCP resources for stopped instances.
  • Also remove IngressRoute resources for stopped instances. When these are left in place, traefik logs the following error:
    {"level":"error","providerName":"kubernetescrd","ingress":"extra-vacantly-joint-hamster-rw","namespace":"vacantly-joint-hamster","serviceName":"vacantly-joint-hamster-rw","servicePort":"5432","error":"no servers found for vacantly-joint-hamster/vacantly-joint-hamster-rw","time":"2024-12-10T19:00:58Z","message":"Cannot create service"}
    
  • Add list_params parameter to list_resources for flexibility when listing resources in tests.

Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
Signed-off-by: Ian Stanton <ian@tembo.io>
@@ -196,7 +197,48 @@ async fn apply_ingress_route_tcp(
Ok(())
}

async fn delete_ingress_route_tcp(
pub async fn delete_ingress_route(
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 can be DRY'd up with the function below

namespace,
cdb_name,
resources.items.len(),
std::any::type_name::<R>(),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Include resource type so we can see what resource we're looking for.

@@ -697,6 +697,7 @@ mod test {
client: Client,
cdb_name: &str,
namespace: &str,
list_params: &ListParams,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pass in ListParams for flexibility


#[tokio::test]
#[ignore]
async fn functional_test_hibernate_with_app_service() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New test for hibernate + app service

@ianstanton ianstanton marked this pull request as ready for review December 12, 2024 18:47
@ianstanton ianstanton merged commit 64040e9 into main Dec 12, 2024
8 of 9 checks passed
@ianstanton ianstanton deleted the delete-ingress-route-for-stopped branch December 12, 2024 20:27
@ChuckHend ChuckHend restored the delete-ingress-route-for-stopped branch December 13, 2024 04:13
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