manifest: autoscaling
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
9f24cd80c1
commit
4acfeb0a93
23
manifest/autoscale.yaml
Normal file
23
manifest/autoscale.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
kind: HTTPScaledObject
|
||||
apiVersion: http.keda.sh/v1alpha1
|
||||
metadata:
|
||||
name: techaro-lol
|
||||
spec:
|
||||
hosts:
|
||||
- techaro.lol
|
||||
targetPendingRequests: 100
|
||||
scaleTargetRef:
|
||||
name: techaro-lol
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
service: techaro-lol
|
||||
port: 80
|
||||
replicas:
|
||||
min: 0
|
||||
max: 10
|
||||
scaledownPeriod: 300
|
||||
scalingMetric:
|
||||
requestRate:
|
||||
granularity: 1s
|
||||
targetValue: 100
|
||||
window: 1m
|
@ -10,6 +10,10 @@ spec:
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
volumes:
|
||||
- name: temp
|
||||
persistentVolumeClaim:
|
||||
claimName: techaro-lol-temp
|
||||
containers:
|
||||
- name: main
|
||||
image: ghcr.io/xe/techaro-lol:latest
|
||||
@ -24,6 +28,10 @@ spec:
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: techaro-lol
|
||||
volumeMounts:
|
||||
- name: temp
|
||||
mountPath: /app/.next/cache
|
||||
subPath: "cache"
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
|
@ -18,6 +18,6 @@ spec:
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: techaro-lol
|
||||
name: keda-add-ons-http-interceptor-proxy
|
||||
port:
|
||||
name: http
|
||||
number: 8080
|
@ -1,7 +1,9 @@
|
||||
resources:
|
||||
- autoscale.yaml
|
||||
- ci.yaml
|
||||
- deployment.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
- secret.yaml
|
||||
- service.yaml
|
||||
|
||||
|
11
manifest/pvc.yaml
Normal file
11
manifest/pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: techaro-lol-temp
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: tigris
|
||||
resources:
|
||||
requests:
|
||||
storage: 2Gi
|
Loading…
x
Reference in New Issue
Block a user