Add unit test

Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
Emile Vauge 2016-04-20 13:26:51 +02:00
parent d82e1342fb
commit c0dd4c3209
No known key found for this signature in database
GPG key ID: D808B4C167352E59
8 changed files with 242 additions and 47 deletions

View file

@ -2,14 +2,14 @@
apiVersion: v1
kind: Service
metadata:
name: whoami-x
name: service1
labels:
app: whoami
spec:
type: NodePort
ports:
- port: 80
nodePort: 30301
nodePort: 30283
targetPort: 80
protocol: TCP
name: http
@ -19,24 +19,7 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: whoami-default
labels:
app: whoami
spec:
type: NodePort
ports:
- port: 80
nodePort: 30302
targetPort: 80
protocol: TCP
name: http
selector:
app: whoami
---
apiVersion: v1
kind: Service
metadata:
name: whoami-y
name: service2
labels:
app: whoami
spec:
@ -50,6 +33,23 @@ spec:
selector:
app: whoami
---
apiVersion: v1
kind: Service
metadata:
name: service3
labels:
app: whoami
spec:
type: NodePort
ports:
- port: 80
nodePort: 30285
targetPort: 80
protocol: TCP
name: http
selector:
app: whoami
---
# A single RC matching all Services
apiVersion: v1
kind: ReplicationController
@ -72,7 +72,7 @@ spec:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: whoamimap
name: whoamiIngress
spec:
rules:
- host: foo.localhost
@ -80,14 +80,14 @@ spec:
paths:
- path: /bar
backend:
serviceName: whoami-x
serviceName: service1
servicePort: 80
- host: bar.localhost
http:
paths:
- backend:
serviceName: whoami-y
serviceName: service2
servicePort: 80
- backend:
serviceName: whoami-x
serviceName: service3
servicePort: 80

View file

@ -19,13 +19,6 @@ spec:
- image: containous/traefik:k8s
name: traefik-ingress-lb
imagePullPolicy: Always
# livenessProbe:
# httpGet:
# path: /healthz
# port: 10249
# scheme: HTTP
# initialDelaySeconds: 30
# timeoutSeconds: 5
ports:
- containerPort: 80
hostPort: 80