prysm-pulse/k8s/beacon-chain/public-api.yaml
2019-06-02 08:33:44 -07:00

152 lines
3.3 KiB
YAML

kind: Deployment
apiVersion: apps/v1
metadata:
name: public-api-swagger-ui
namespace: beacon-chain
labels:
app: beacon-chain
component: public-api-swagger-ui
version: production
spec:
replicas: 1
selector:
matchLabels:
app: beacon-chain
component: public-api-swagger-ui
version: production
template:
metadata:
labels:
app: beacon-chain
component: public-api-swagger-ui
version: production
spec:
priorityClassName: production-priority
containers:
- name: ui
image: swaggerapi/swagger-ui:v3.0.5
ports:
- containerPort: 8080
name: http-ui
env:
- name: API_URL
value: https://api.prylabs.net/swagger/services.swagger.json
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 3
periodSeconds: 15
resources:
requests:
cpu: "100m"
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: public-api-swagger-ui
namespace: beacon-chain
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: public-api-swagger-ui
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: public-api-gateway
namespace: beacon-chain
labels:
app: beacon-chain
component: public-api-gateway
version: production
spec:
replicas: 1
selector:
matchLabels:
app: beacon-chain
component: public-api-gateway
version: production
template:
metadata:
labels:
app: beacon-chain
component: public-api-gateway
version: production
spec:
priorityClassName: production-priority
containers:
- name: server
image: gcr.io/prysmaticlabs/prysm/beacon-chain/gateway:latest
args:
- --beacon-rpc=beacon-chain.beacon-chain.svc.cluster.local:4000
- --port=8000
ports:
- containerPort: 8000
name: http-gateway
livenessProbe:
httpGet:
path: /healthz
port: 8000
initialDelaySeconds: 3
periodSeconds: 15
resources:
requests:
cpu: "100m"
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: public-api-gateway
namespace: beacon-chain
spec:
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: public-api-gateway
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
---
kind: Service
apiVersion: v1
metadata:
name: public-api-gateway
namespace: beacon-chain
spec:
selector:
app: beacon-chain
component: public-api-gateway
ports:
- port: 8000
targetPort: 8000
name: http
type: ClusterIP
---
kind: Service
apiVersion: v1
metadata:
name: public-api-ui
namespace: beacon-chain
spec:
selector:
app: beacon-chain
component: public-api-swagger-ui
ports:
- port: 8080
targetPort: 8080
name: http
type: ClusterIP