Scale down Kubernetes deployments after work hours
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

84 lines
1.1 KiB

apiVersion: v1
kind: ServiceAccount
metadata:
name: kube-downscaler
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kube-downscaler
rules:
- apiGroups:
- ""
resources:
- pods
- namespaces
verbs:
- get
- watch
- list
- apiGroups:
- apps
resources:
- deployments
- statefulsets
verbs:
- get
- watch
- list
- update
- patch
- apiGroups:
- autoscaling
resources:
- horizontalpodautoscalers
verbs:
- get
- watch
- list
- update
- patch
- apiGroups:
- batch
resources:
- cronjobs
verbs:
- get
- watch
- list
- update
- patch
- apiGroups:
- zalando.org
resources:
- stacks
verbs:
- get
- watch
- list
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- create
- watch
- list
- update
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kube-downscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kube-downscaler
subjects:
- kind: ServiceAccount
name: kube-downscaler
namespace: default