kubernetes-handbook/manifests/linkerd/hello-world-latency.yml

92 lines
1.7 KiB
YAML
Raw Normal View History

2017-08-01 21:20:16 +08:00
---
apiVersion: v1
kind: ReplicationController
metadata:
name: hello
spec:
replicas: 1
selector:
app: hello
template:
metadata:
labels:
app: hello
spec:
dnsPolicy: ClusterFirst
containers:
- name: service
2018-05-04 19:48:54 +08:00
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
2017-08-01 21:20:16 +08:00
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: http_proxy
value: $(NODE_NAME):4140
args:
- "-addr=:7777"
- "-text=Hello"
- "-target=world"
- "-latency=500ms"
ports:
- name: service
containerPort: 7777
---
apiVersion: v1
kind: Service
metadata:
name: hello
spec:
selector:
app: hello
clusterIP: None
ports:
- name: http
port: 7777
---
apiVersion: v1
kind: ReplicationController
metadata:
name: world-v1
spec:
replicas: 1
selector:
app: world-v1
template:
metadata:
labels:
app: world-v1
spec:
dnsPolicy: ClusterFirst
containers:
- name: service
2018-05-04 19:48:54 +08:00
image: harbor-001.jimmysong.io/library/buoyantio-helloworld:0.1.4
2017-08-01 21:20:16 +08:00
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: TARGET_WORLD
value: world
args:
- "-addr=:7778"
ports:
- name: service
containerPort: 7778
---
apiVersion: v1
kind: Service
metadata:
name: world-v1
spec:
selector:
app: world-v1
clusterIP: None
ports:
- name: http
port: 7778