mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 17:37:13 +02:00
Setup sandbox for GCP proxy
1) Clean up alpha config to only allow alpha proxy, removing test proxy client id. 2) Add sandbox service account client id to sandbox config. 3) Add sandbox config to nomulus and proxy, remove TEST environment, which is not being used anymore. (Test now uses LOCAL.) 4) Add sandbox kubenetes config ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193400909
This commit is contained in:
parent
9ed4d43f41
commit
c6a4264606
5 changed files with 159 additions and 2 deletions
|
@ -0,0 +1,65 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: default
|
||||
name: proxy-deployment-canary
|
||||
labels:
|
||||
app: proxy-canary
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: proxy-canary
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: proxy-canary
|
||||
spec:
|
||||
containers:
|
||||
- name: proxy-canary
|
||||
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", "sandbox_canary"]
|
||||
env:
|
||||
- name: POD_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: NAMESPACE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONTAINER_NAME
|
||||
value: proxy-canary
|
||||
---
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
namespace: default
|
||||
name: proxy-autoscale-canary
|
||||
labels:
|
||||
app: proxy-canary
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: proxy-deployment-canary
|
||||
maxReplicas: 5
|
||||
minReplicas: 1
|
|
@ -0,0 +1,65 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
namespace: default
|
||||
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", "sandbox"]
|
||||
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:
|
||||
namespace: default
|
||||
name: proxy-autoscale
|
||||
labels:
|
||||
app: proxy
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
name: proxy-deployment
|
||||
maxReplicas: 5
|
||||
minReplicas: 1
|
|
@ -0,0 +1,25 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
namespace: default
|
||||
name: proxy-service-canary
|
||||
spec:
|
||||
selector:
|
||||
app: proxy-canary
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 30000
|
||||
nodePort: 31000
|
||||
targetPort: health-check
|
||||
name: health-check
|
||||
- protocol: TCP
|
||||
port: 30001
|
||||
nodePort: 31001
|
||||
targetPort: whois
|
||||
name: whois
|
||||
- protocol: TCP
|
||||
port: 30002
|
||||
nodePort: 31002
|
||||
targetPort: epp
|
||||
name: epp
|
||||
type: NodePort
|
Loading…
Add table
Add a link
Reference in a new issue