1
0
mirror of https://github.com/google/nomulus synced 2026-01-03 11:45:39 +00:00
Files
nomulus/jetty/kubernetes/nomulus-console.yaml
Pavlo Tkach 18614ba11e Update resource allocation for all Nomulus GKE deployments (#2796)
ALl deployments received update to averageUtilization cpu. This should allow us to stay ahead of the curve of traffic and create instances before we cpu reached the limit.
Frontend cpu allocation has caused "noise neighbors" problem with pods assigned to nodes where there's not enough bursting capacity, so I increased it.
Adjusted rest of the deployments according to their utilization.
2025-08-08 17:55:08 +00:00

97 lines
2.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: console
annotations:
tag: "latest"
spec:
selector:
matchLabels:
service: console
template:
metadata:
labels:
service: console
spec:
serviceAccountName: nomulus
containers:
- name: console
image: gcr.io/GCP_PROJECT/nomulus
ports:
- containerPort: 8080
name: http
startupProbe:
httpGet:
port: 8080
path: /ready/console
initialDelaySeconds: 1
timeoutSeconds: 60
successThreshold: 1
failureThreshold: 3
periodSeconds: 30
resources:
requests:
# explicit pod-slots 0 is required in order to downgrade node
# class from performance, which has implicit pod-slots 1
cloud.google.com/pod-slots: 0
cpu: "100m"
memory: "512Mi"
limits:
# explicit pod-slots 0 is required in order to downgrade node
# class from performance, which has implicit pod-slots 1
cloud.google.com/pod-slots: 0
cpu: "500m"
memory: "1Gi"
args: [ENVIRONMENT]
env:
- name: POD_ID
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: JETTY_WORKER_INSTANCE
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE_ID
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONTAINER_NAME
value: console
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: console
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: console
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
---
apiVersion: v1
kind: Service
metadata:
name: console
spec:
selector:
service: console
ports:
- port: 80
targetPort: http
name: http
---
apiVersion: net.gke.io/v1
kind: ServiceExport
metadata:
name: console