eindelijk weer eens een push
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Deployment for the node-balancer
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: node-balancer
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: node-balancer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: node-balancer
|
||||
spec:
|
||||
serviceAccountName: node-balancer
|
||||
containers:
|
||||
- name: node-balancer
|
||||
image: allardkrings/node-balancer:1.0
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: CPU_OVERLOAD_THRESHOLD
|
||||
value: "50"
|
||||
- name: CPU_UNDERLOAD_THRESHOLD
|
||||
value: "10"
|
||||
- name: MEMORY_OVERLOAD_THRESHOLD
|
||||
value: "70"
|
||||
- name: MEMORY_UNDERLOAD_THRESHOLD
|
||||
value: "30"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: node-balancer
|
||||
namespace: kube-system
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: node-balancer
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "pods"]
|
||||
verbs: ["get", "list", "watch", "delete"]
|
||||
- apiGroups: ["metrics.k8s.io"]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
# Binding of role to account
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: node-balancer-binding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: node-balancer
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: node-balancer
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
Reference in New Issue
Block a user