mirror of
https://github.com/hanzoai/vm.git
synced 2026-10-30 14:55:23 +00:00
Add autoscaler/watcher.go for detecting Pending/Unschedulable pods and triggering DOKS node pool scale-up with cooldowns and org attribution. Add autoscaler/sizing.go for pod resource requests to DO droplet size mapping. Add k8s/rbac.yaml with ServiceAccount and ClusterRole for pod/node list+watch. Co-authored-by: Hanzo Dev <[email protected]>
31 lines
600 B
YAML
31 lines
600 B
YAML
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: visor
|
|
namespace: hanzo
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: visor-autoscaler
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["list", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["nodes"]
|
|
verbs: ["list", "watch"]
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRoleBinding
|
|
metadata:
|
|
name: visor-autoscaler
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: visor-autoscaler
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: visor
|
|
namespace: hanzo
|