albertrdixon / romulus

A kubernetes ingress controller
MIT License
103 stars 12 forks source link

romulus does not add anything to etcd when creating a k8s service #21

Closed MalteJ closed 8 years ago

MalteJ commented 8 years ago

Hi,

I have set up an k8s nginx service:

apiVersion: v1
kind: Service
metadata:
  name: example
  annotations:
      romulus/host: 'www.example.com'
      romulus/pathRegexp: '/.*'
  labels:
    name: example
    romulus/type: external
spec:
  ports:
  - port: 80
    targetPort: 80
    name: web
  selector:
    app: nginx-demo
# kubectl describe service example
Name:           example
Namespace:      default
Labels:         name=example,romulus/type=external
Selector:       app=nginx-demo
Type:           ClusterIP
IP:         172.29.15.27
Port:           web 80/TCP
Endpoints:      10.8.161.3:80,10.8.161.4:80,10.8.161.5:80
Session Affinity:   None
No events.

I start vulcand and romulusd:

docker run -d --name vulcand --net=host mailgun/vulcand:v0.8.0-beta.3 /go/bin/vulcand -apiInterface=127.0.0.1 --etcd=http://etcd:4001
sleep 3
docker run -d --name romulusd --net=host quay.io/timeline_labs/romulusd --kube-api=http://k8s-master -l debug --kube-insecure

I have not added something to /vulcan in etcd manually - which means it is empty/non-existant. The romulusd logs:

[romulusd] 2016/01/13 13:02:26 [info] Starting up romulusd version=v0.1.3-440b1525
[romulusd] 2016/01/13 13:02:26 [debug] Setting up Service cache
[romulusd] 2016/01/13 13:02:26 [debug] Setting up Service and Ingress callbacks
[romulusd] 2016/01/13 13:02:26 [debug] Running ListFunc for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/api/v1/services
[romulusd] 2016/01/13 13:02:26 [debug] Running ListFunc for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/api/v1/services
[romulusd] 2016/01/13 13:02:26 [debug] Running WatchFunc for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/api/v1/watch/services?resourceVersion=400530
[romulusd] 2016/01/13 13:02:26 [debug] Running WatchFunc for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/api/v1/watch/services?resourceVersion=400530
[romulusd] 2016/01/13 13:02:26 [debug] Running ListFunc for "ingresses"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/apis/extensions/v1beta1/ingresses
[romulusd] 2016/01/13 13:02:26 [debug] Set watch for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Set watch for "services"
[romulusd] 2016/01/13 13:02:26 [debug] Running WatchFunc for "ingresses"
[romulusd] 2016/01/13 13:02:26 [debug] Request URL: http://k8s-master:8080/apis/extensions/v1beta1/watch/ingresses?resourceVersion=400530
[romulusd] 2016/01/13 13:02:26 [debug] Set watch for "ingresses"

My problem is romulusd does not write anything to etcd when I add the k8s service. But I get some errors in the log, when I delete the service:

romulusd] 2016/01/13 13:03:59 [debug] [Callback] Delete Service(Name="example", Namespace="default")
[romulusd] 2016/01/13 13:03:59 [debug] Gathering Backends from Service(Name="example", Namespace="default")
[romulusd] 2016/01/13 13:03:59 [debug] Service(Name="example", Namespace="default") :: Port(name="web", port=80)
[romulusd] 2016/01/13 13:03:59 [debug] Lookup Backend: "default.example.web"
[romulusd] 2016/01/13 13:03:59 [debug] Lookup failed: 100: Key not found (/vulcand) [400544]
[romulusd] 2016/01/13 13:03:59 [debug] Lookup Backend: "default.example"
[romulusd] 2016/01/13 13:03:59 [debug] Lookup failed: 100: Key not found (/vulcand) [400544]

what am I missing???

Thanks for your help! Malte

MalteJ commented 8 years ago

ahh, I have used the latest docker image, which is built from the feature/ingress branch. Using romulusd:dev works :)