kubernetes-handbook/manifests/openfaas/faas.yml

87 lines
1.7 KiB
YAML

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: harbor-001.jimmysong.io/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: harbor-001.jimmysong.io/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