setup namespaces

This commit is contained in:
Victor Barba Martin 2021-07-19 19:17:05 +02:00
parent 8a89fa4aa2
commit d757e8fd4e
1 changed files with 58 additions and 1 deletions

View File

@ -3,7 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-autoscaler
namespace: default ####### Change this to the actual namespace
namespace: coturn
spec:
replicas: 1
strategy:
@ -55,3 +55,60 @@ spec:
memory: 32Mi
limits:
memory: 32Mi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-autoscaler
namespace: webrtc-be
spec:
replicas: 1
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app: k8s-autoscale
template:
metadata:
labels:
app: k8s-autoscale
spec:
containers:
- name: k8s-autoscale
command: ["/bin/sleep"]
args: ["300"]
image: gcr.io/tough-craft-276813/linode-autoscaler:prod-0.1.5 ###{{linode_autoscaler_image}} ####### CHANGE THIS TO YOUR ACTUAL DOCKER IMAGE
env:
- name: LINODE_PERSONAL_ACCCESS_TOKEN
valueFrom:
secretKeyRef:
name: linode-personal-access-token-k8s-autoscaler ####### LINODE PERSONAL ACCESS TOKEN SECRET
key: token
- name: LINODE_LKE_CLUSTER_ID
value: "29062"
- name: LINODE_LKE_CLUSTER_POOL_ID
value: "47218"
- name: AUTOSCALE_TRIGGER
value: "cpu"
- name: AUTOSCALE_TRIGGER_TYPE
value: "used"
- name: AUTOSCALE_UP_PERCENTAGE
value: "10"
- name: AUTOSCALE_DOWN_PERCENTAGE
value: "30"
- name: AUTOSCALE_QUERY_INTERVAL
value: "30"
- name: AUTOSCALE_THRESHOLD_COUNT
value: "3"
- name: AUTOSCALE_NUMBER_OF_NODES
value: "1"
- name: AUTOSCALE_WAIT_TIME_AFTER_SCALING
value: "150"
resources:
requests:
memory: 32Mi
limits:
memory: 32Mi