-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Don't look up services in all namespaces. #2651
Don't look up services in all namespaces. #2651
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- I think we just need to get namespaces from user defined port forwarding, which I added here along with unit tests.
that way people can still port forward additional resources which skaffold didn't deploy.
hmm, for user defined port forwarding, why do we need to fetch it? We should be able to get the specific resource right? |
ah that's true, nevermind! |
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
}, | ||
}, | ||
}, { | ||
description: "services present but does not expose any port", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this possible for a service?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you wont normally do it. But yes, you can not have any ports defined in the Spec and the service is created.
$ kubectl apply -f microservices/leeroy-app/kubernetes/
service/leeroy-app created
deployment.apps/leeroy-app created
$ git diff microservices/leeroy-app/kubernetes/
diff --git a/examples/microservices/leeroy-app/kubernetes/deployment.yaml b/examples/microservices/leeroy-app/kubernetes/deployment.yaml
index 56ef7152..46feab6d 100644
--- a/examples/microservices/leeroy-app/kubernetes/deployment.yaml
+++ b/examples/microservices/leeroy-app/kubernetes/deployment.yaml
@@ -6,9 +6,6 @@ metadata:
app: leeroy-app
spec:
clusterIP: None
- ports:
- - port: 50051
- name: leeroy-app
selector:
app: leeroy-app
---
tejaldesai@@examples (move_resolve_namespace)$
fixes #2495,
In #2640, i made changes to collect all namespaces for deployed resources.
In PR, we go through all namespaces in the context and then look for services in each namespace.