2017-12-19 22:37:48 +08:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: faas-netesd
|
|
|
|
labels:
|
|
|
|
app: faas-netesd
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
ports:
|
|
|
|
- port: 8080
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8080
|
|
|
|
nodePort: 31111
|
|
|
|
selector:
|
|
|
|
app: faas-netesd
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
|
|
|
metadata:
|
|
|
|
name: faas-controller
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: faas-netesd
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: faas-netesd
|
|
|
|
spec:
|
|
|
|
serviceAccountName: faas-controller
|
|
|
|
containers:
|
|
|
|
- name: faas-netesd
|
2018-05-04 19:48:54 +08:00
|
|
|
image: harbor-001.jimmysong.io/library/faas-netesd:0.3.4
|
2017-12-19 22:37:48 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
protocol: TCP
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: 20Mi
|
|
|
|
limits:
|
|
|
|
memory: 30Mi
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: gateway
|
|
|
|
labels:
|
|
|
|
app: gateway
|
|
|
|
spec:
|
|
|
|
type: NodePort
|
|
|
|
ports:
|
|
|
|
- port: 8080
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 8080
|
|
|
|
nodePort: 31112
|
|
|
|
selector:
|
|
|
|
app: gateway
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: gateway
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: gateway
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: gateway
|
2018-05-04 19:48:54 +08:00
|
|
|
image: harbor-001.jimmysong.io/library/gateway:0.6.14
|
2017-12-19 22:37:48 +08:00
|
|
|
env:
|
|
|
|
- name: functions_provider_url
|
|
|
|
value: "http://faas-netesd.default.svc.cluster.local:8080/"
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
protocol: TCP
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
memory: 20Mi
|
|
|
|
limits:
|
|
|
|
memory: 30Mi
|