Skip to content
This repository was archived by the owner on Dec 16, 2021. It is now read-only.
This repository was archived by the owner on Dec 16, 2021. It is now read-only.

Default k8s services domains are hardcoded in trigger, can`t specify it in config #22

Description

Is this a BUG REPORT or FEATURE REQUEST?:
bug

What happened:
After kafka message put into queue, kafka-trigger-controller pod shows error in logs

time="2020-02-20T16:23:07Z" level=error msg="Failed to send message to function: Post http://nodejs-kafka-consumer-sample.<test_namespace_here>.svc.cluster.local:8080: dial tcp: lookup nodejs-kafka-consumer-sample.<test_namespace_here>.svc.cluster.local on 10.233.0.3:53: no such host"

What you expected to happen:
Trigger send message to function pod nodejs-kafka-consumer-sample, can see logged event in its logs.

May be this domain should be got from configMap (kubeless-config?).

How to reproduce it (as minimally and precisely as possible):

  • K8s server, one namespace with all demanded deployments, statefulSets, etc. Have configured kafka+zoo+kafkaHq.
  • Deploy function, trigger:
kubeless function deploy nodejs-kafka-consumer-sample --runtime nodejs12 \
	--dependencies kafkaConsumer_dependency.json \
	--handler kafkaConsumer.consumeTagTopic 	 \
        --from-file kafkaConsumer.js
kubeless trigger kafka create nodejs-kafka-consumer-sample --function-selector created-by=kubeless,function=nodejs-kafka-consumer-sample --trigger-topic nodejs-kafka-consumer-sample-in
  • using kafkaHq add message (topic created by this new function)
  • check trigger pod logs

Anything else we need to know?:
kubelet run with --cluster-domain=k8s.test option
Sources have hardcoded literal with domain:
event_sender.go: 57

 fmt.Sprintf("http://%s.%s.svc.cluster.local:%s", funcName, namespace, funcPort)

Seems to be bug.

Environment:

  • Kubernetes version: 1.11.3
  • Kubeless version: 1.0.5-dirty
  • Cloud provider or physical cluster: physical
  • Kafka statefull set + Zoo statefull set installed/configured before, publishing messages via kafka UI (kafkaHQ)
  • Kafka, Zoo, Triggers, Functions, Kubeless, kubeless-config at one namespace on the test k8s server.
  • HTTP trigger works well (js script in function).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions