mirror of
https://github.com/google/nomulus.git
synced 2025-05-05 06:27:51 +02:00
With terraform (https://terraform.io) we can convert most of the infrastructure setup into code. This simplifies setting up a new proxy as well as providing reproducibility in the setup, eliminating human errors as much as possible. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190634711
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: proxy-deployment
|
|
labels:
|
|
app: proxy
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: proxy
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: proxy
|
|
spec:
|
|
containers:
|
|
- name: proxy
|
|
image: gcr.io/GCP_PROJECT/IMAGE_NAME:bazel
|
|
ports:
|
|
- containerPort: 30000
|
|
name: health-check
|
|
- containerPort: 30001
|
|
name: whois
|
|
- containerPort: 30002
|
|
name: epp
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: health-check
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
tcpSocket:
|
|
port: health-check
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 20
|
|
imagePullPolicy: Always
|
|
args: ["--env", "alpha", "--log"]
|
|
env:
|
|
- name: POD_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: NAMESPACE_ID
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: CONTAINER_NAME
|
|
value: proxy
|
|
---
|
|
apiVersion: autoscaling/v2beta1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: proxy-autoscale
|
|
labels:
|
|
app: proxy
|
|
spec:
|
|
scaleTargetRef:
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
name: proxy-deployment
|
|
maxReplicas: 5
|
|
minReplicas: 1
|