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

Fix: Add kubernetes namespace to function instance url #4701

Merged
merged 3 commits into from
Jul 21, 2019

Conversation

jerrypeng
Copy link
Contributor

Motivation

Currently, if the kubernetes namespace set to deploy functions in is different than the one in which brokers/workers reside, get status and stats doesn't work because the url for instances does not specify the namespace.

@jerrypeng jerrypeng added type/bug The PR fixed a bug or issue reported a bug area/function labels Jul 10, 2019
@jerrypeng jerrypeng added this to the 2.4.1 milestone Jul 10, 2019
@jerrypeng jerrypeng requested review from merlimat and sijie July 10, 2019 06:40
@jerrypeng jerrypeng self-assigned this Jul 10, 2019
@jerrypeng
Copy link
Contributor Author

@cckellogg please also take look

@@ -993,6 +993,10 @@ private static String createJobName(String tenant, String namespace, String func
return "pf-" + tenant + "-" + namespace + "-" + functionName;
}

private static String getServiceUrl(String jobName, String jobNamespace, int instanceId) {
return String.format("%s-%d.%s.%s", jobName, instanceId, jobName, jobNamespace);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That format worked when I tested in minikube

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe by default "svc.cluster.local" is added on if not specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lets add it since that is what is in the documentation

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think either should work.

@merlimat
Copy link
Contributor

retest this please

@sijie
Copy link
Member

sijie commented Jul 20, 2019

run cpp tests

@sijie sijie merged commit 8c3445a into apache:master Jul 21, 2019
easyfan pushed a commit to easyfan/pulsar that referenced this pull request Jul 26, 2019
### Motivation


Currently, if the kubernetes namespace set to deploy functions in is different than the one in which brokers/workers reside, get status and stats doesn't work because the url for instances does not specify the namespace.
jiazhai pushed a commit that referenced this pull request Aug 28, 2019
### Motivation

Currently, if the kubernetes namespace set to deploy functions in is different than the one in which brokers/workers reside, get status and stats doesn't work because the url for instances does not specify the namespace.
(cherry picked from commit 8c3445a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/function type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants