mirror of
https://github.com/google/nomulus
synced 2026-09-21 07:24:26 +00:00
Expose EPP via saidcar proxy (#2680)
This commit is contained in:
@@ -12,6 +12,8 @@ spec:
|
||||
service: backend
|
||||
spec:
|
||||
serviceAccountName: nomulus
|
||||
nodeSelector:
|
||||
cloud.google.com/compute-class: "Performance"
|
||||
containers:
|
||||
- name: backend
|
||||
image: gcr.io/GCP_PROJECT/nomulus
|
||||
@@ -20,7 +22,8 @@ spec:
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: "500m"
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
args: [ENVIRONMENT]
|
||||
env:
|
||||
- name: POD_ID
|
||||
|
||||
@@ -12,6 +12,8 @@ spec:
|
||||
service: console
|
||||
spec:
|
||||
serviceAccountName: nomulus
|
||||
nodeSelector:
|
||||
cloud.google.com/compute-class: "Performance"
|
||||
containers:
|
||||
- name: console
|
||||
image: gcr.io/GCP_PROJECT/nomulus
|
||||
@@ -20,7 +22,8 @@ spec:
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: "500m"
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
args: [ENVIRONMENT]
|
||||
env:
|
||||
- name: POD_ID
|
||||
|
||||
@@ -12,6 +12,8 @@ spec:
|
||||
service: frontend
|
||||
spec:
|
||||
serviceAccountName: nomulus
|
||||
nodeSelector:
|
||||
cloud.google.com/compute-class: "Performance"
|
||||
containers:
|
||||
- name: frontend
|
||||
image: gcr.io/GCP_PROJECT/nomulus
|
||||
@@ -20,7 +22,8 @@ spec:
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: "500m"
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
args: [ENVIRONMENT]
|
||||
env:
|
||||
- name: POD_ID
|
||||
@@ -37,6 +40,27 @@ spec:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONTAINER_NAME
|
||||
value: frontend
|
||||
- name: EPP
|
||||
image: gcr.io/GCP_PROJECT/proxy
|
||||
ports:
|
||||
- containerPort: 30002
|
||||
name: epp
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
args: [--env, PROXY_ENV, --log, --local]
|
||||
env:
|
||||
- name: POD_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: NAMESPACE_ID
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONTAINER_NAME
|
||||
value: EPP
|
||||
---
|
||||
# Only need to define the service account once per cluster.
|
||||
apiVersion: v1
|
||||
@@ -55,7 +79,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: frontend
|
||||
minReplicas: 5
|
||||
minReplicas: 15
|
||||
maxReplicas: 15
|
||||
metrics:
|
||||
- type: Resource
|
||||
@@ -77,6 +101,26 @@ spec:
|
||||
targetPort: http
|
||||
name: http
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: EPP
|
||||
annotations:
|
||||
cloud.google.com/l4-rbs: enabled
|
||||
networking.gke.io/weighted-load-balancing: pods-per-node
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
# Traffic is directly delivered to a node, preserving the original source IP.
|
||||
externalTrafficPolicy: Local
|
||||
ipFamilies: [IPv4, IPv6]
|
||||
ipFamilyPolicy: RequireDualStack
|
||||
selector:
|
||||
service: frontend
|
||||
ports:
|
||||
- port: 700
|
||||
targetPort: epp
|
||||
name: epp
|
||||
---
|
||||
apiVersion: net.gke.io/v1
|
||||
kind: ServiceExport
|
||||
metadata:
|
||||
|
||||
@@ -12,6 +12,8 @@ spec:
|
||||
service: pubapi
|
||||
spec:
|
||||
serviceAccountName: nomulus
|
||||
nodeSelector:
|
||||
cloud.google.com/compute-class: "Performance"
|
||||
containers:
|
||||
- name: pubapi
|
||||
image: gcr.io/GCP_PROJECT/nomulus
|
||||
@@ -20,7 +22,8 @@ spec:
|
||||
name: http
|
||||
resources:
|
||||
requests:
|
||||
cpu: "500m"
|
||||
cpu: "100m"
|
||||
memory: "512Mi"
|
||||
args: [ENVIRONMENT]
|
||||
env:
|
||||
- name: POD_ID
|
||||
|
||||
Reference in New Issue
Block a user