kubernetes-handbook/manifests/openfaas/faas.yml

87 lines
1.7 KiB
YAML
Raw Normal View History

2017-12-19 22:39:23 +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
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/faas-netesd:0.3.4
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
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/gateway:0.6.14
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