This repository was archived by the owner on Dec 16, 2021. It is now read-only.
Invoking k8s service with proper k8s domain#23
Open
mgolovatiy-atconsulting-ru wants to merge 1 commit into
Open
Invoking k8s service with proper k8s domain#23mgolovatiy-atconsulting-ru wants to merge 1 commit into
mgolovatiy-atconsulting-ru wants to merge 1 commit into
Conversation
andresmgot
reviewed
Feb 26, 2020
andresmgot
left a comment
Contributor
There was a problem hiding this comment.
Thanks for starting this PR :)
It seems that your code is failing because there is an extra dot:
pod/kafka-trigger-controller-74f96c6c8f-kxg62: time="2020-02-25T17:44:02Z" level=error msg="Failed to send message to function: Post http://pubsub-python.default.svc..cluster.local:8080: dial tcp: lookup pubsub-python.default.svc..cluster.local: no such host"
andresmgot
reviewed
Feb 26, 2020
|
|
||
| clusterDomain := "cluster.local" | ||
|
|
||
| cname, err := net.LookupCNAME(apiSvc) |
Contributor
There was a problem hiding this comment.
An issue with this solution is that this function is called every time there is a new message. This could lead to a bottleneck. You will need to move the call to getClusterDomain outside. I would put it in the init() method of kafka-consumer.go and store it as a package variable (for example) so you don't need to re-request it.
faa78b4 to
7b7637e
Compare
Author
|
What wrong with code format? |
Contributor
|
You can try executing: and commit the result |
…h --cluster-domain option)
7b7637e to
14f8b62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Ref: #22
Description:
Invoking k8s service with proper k8s domain (in case kubelet runs with --cluster-domain option)
TODOs: