-
-
Save olix0r/c87538ca14ca93bb5f940780079edcfa to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
set -eu | |
( | |
cat ./server.yml | ${SERVER_GEN:-cat -} ; | |
cat ./middle.yml | ${MIDDLE_GEN:-cat -} ; | |
cat ./client.yml | ${CLIENT_GEN:-cat -} | |
) | kubectl apply -f - |
This file contains 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
--- | |
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: bb | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: client | |
name: client | |
namespace: bb | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: client | |
spec: | |
containers: | |
- name: slow-cooker | |
image: buoyantio/slow_cooker:1.1.0 | |
imagePullPolicy: IfNotPresent | |
command: | |
- "/bin/bash" | |
args: | |
- "-c" | |
- | | |
exec slow_cooker \ | |
-concurrency 1 \ | |
-qps 3 \ | |
-interval 20s \ | |
-metric-addr 0.0.0.0:9990 \ | |
http://middle.bb.svc.cluster.local:8080 | |
ports: | |
- name: admin-http | |
containerPort: 9990 | |
This file contains 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
--- | |
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: bb | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: middle | |
namespace: bb | |
spec: | |
clusterIP: None | |
selector: | |
app: middle | |
ports: | |
- name: http | |
port: 8080 | |
targetPort: 8080 | |
# - name: grpc | |
# port: 9090 | |
# targetPort: 9090 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: middle | |
name: middle | |
namespace: bb | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: middle | |
spec: | |
containers: | |
- name: bb | |
image: buoyantio/bb:v0.0.3 | |
imagePullPolicy: IfNotPresent | |
command: | |
- "/bin/bash" | |
args: | |
- "-c" | |
- | | |
exec /out/bb point-to-point-channel \ | |
--h1-server-port=8080 \ | |
--grpc-downstream-server=server.bb.svc.cluster.local:9090 | |
ports: | |
- containerPort: 8080 | |
name: http |
This file contains 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
--- | |
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: bb | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: server | |
namespace: bb | |
spec: | |
clusterIP: None | |
selector: | |
app: server | |
ports: | |
# - name: http | |
# port: 8080 | |
# targetPort: 8080 | |
- name: grpc | |
port: 9090 | |
targetPort: 9090 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: server | |
name: server | |
namespace: bb | |
spec: | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: server | |
spec: | |
containers: | |
- name: pause | |
image: gcr.io/google_containers/pause-amd64:3.0 | |
- name: bb | |
image: buoyantio/bb:v0.0.3 | |
imagePullPolicy: IfNotPresent | |
command: | |
- "/bin/bash" | |
args: | |
- "-c" | |
- | | |
exec /out/bb terminus \ | |
--grpc-server-port=9090 \ | |
--response-text=IAMABANANA \ | |
--terminate-after=60 | |
ports: | |
# - containerPort: 8080 | |
# name: http | |
- containerPort: 9090 | |
name: grpc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment