Skip to content

Instantly share code, notes, and snippets.

@onefoursix
Created January 12, 2022 18:56
Show Gist options
  • Save onefoursix/8c277660ffb329caab5017673e9a11e7 to your computer and use it in GitHub Desktop.
Save onefoursix/8c277660ffb329caab5017673e9a11e7 to your computer and use it in GitHub Desktop.
Example manifest for an SDC Deployment with an HPA
apiVersion: 1
kind: List
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: sdc
namespace: ns1
labels:
app: sdc-microservice
spec:
replicas: 1
selector:
matchLabels:
app: sdc
template:
metadata:
labels:
app: sdc
spec:
containers:
- name: sdc
image: <SDC-image>
resources:
limits:
memory: 12000Mi
cpu: 3500m
requests:
memory: 256Mi
cpu: 500m
ports:
- containerPort: 18666
env:
- name: SDC_JAVA_OPTS
value: "-Xmx8g -Xms6g"
- apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: sdc-hpa
namespace: ns1
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: sdc
minReplicas: 1
maxReplicas: 3
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 80
- type: Resource
resource:
name: memory
target:
type: AverageValue
averageValue: 8000Mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment