google-nomulus/java/google/registry/proxy/kubernetes/proxy-deployment-alpha.yaml
jianglai 22b575b17d Update proxy k8s configs
Some changes are made to the configs so that they agree with the setup guide in []

Combined deployment and autoscale manifests together because they work together.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=189403435
2018-03-19 18:40:42 -04:00

72 lines
1.7 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:
volumes:
- name: service-account-key
secret:
secretName: service-account
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
volumeMounts:
- name: service-account-key
mountPath: /var/secrets/google
imagePullPolicy: Always
args: ["--env", "alpha", "--log"]
env:
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /var/secrets/google/service-account-key.json
- 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