Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with min
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

166 lines
3.5 KiB

kind: Deployment
apiVersion: apps/v1
metadata:
name: appa
labels:
app.kubernetes.io/name: 'appa'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: appa
template:
metadata:
labels:
app.kubernetes.io/name: 'appa'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
containers:
- name: appa
image: appa:1.0.0
imagePullPolicy: Always
env:
- name: DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value: 'true'
- name: ASPNETCORE_URLS
value: 'http://*'
- name: PORT
value: '80'
- name: SERVICE__APPA__PROTOCOL
value: 'http'
- name: SERVICE__APPA__PORT
value: '80'
- name: SERVICE__APPA__HOST
value: 'appa'
- name: SERVICE__APPB__PROTOCOL
value: 'http'
- name: SERVICE__APPB__PORT
value: '80'
- name: SERVICE__APPB__HOST
value: 'appb'
ports:
- containerPort: 80
...
---
kind: Service
apiVersion: v1
metadata:
name: appa
labels:
app.kubernetes.io/name: 'appa'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
selector:
app.kubernetes.io/name: appa
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
...
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: appb
labels:
app.kubernetes.io/name: 'appb'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
replicas: 2
selector:
matchLabels:
app.kubernetes.io/name: appb
template:
metadata:
labels:
app.kubernetes.io/name: 'appb'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
containers:
- name: appb
image: appb:1.0.0
imagePullPolicy: Always
env:
- name: DOTNET_LOGGING__CONSOLE__DISABLECOLORS
value: 'true'
- name: ASPNETCORE_URLS
value: 'http://*'
- name: PORT
value: '80'
- name: SERVICE__APPB__PROTOCOL
value: 'http'
- name: SERVICE__APPB__PORT
value: '80'
- name: SERVICE__APPB__HOST
value: 'appb'
- name: SERVICE__APPA__PROTOCOL
value: 'http'
- name: SERVICE__APPA__PORT
value: '80'
- name: SERVICE__APPA__HOST
value: 'appa'
ports:
- containerPort: 80
...
---
kind: Service
apiVersion: v1
metadata:
name: appb
labels:
app.kubernetes.io/name: 'appb'
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
selector:
app.kubernetes.io/name: appb
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80
...
---
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: ingress
annotations:
kubernetes.io/ingress.class: 'nginx'
nginx.ingress.kubernetes.io/rewrite-target: '/$2'
labels:
app.kubernetes.io/part-of: 'apps-with-ingress'
spec:
rules:
- http:
paths:
- backend:
serviceName: appa
servicePort: 80
path: /A(/|$)(.*)
- backend:
serviceName: appb
servicePort: 80
path: /B(/|$)(.*)
- backend:
serviceName: appa
servicePort: 80
path: /()(C.*)
- host: a.example.com
http:
paths:
- backend:
serviceName: appa
servicePort: 80
path: /()(.*)
- host: b.example.com
http:
paths:
- backend:
serviceName: appb
servicePort: 80
path: /()(.*)
...