Install
helm repo add crane https://gocrane.github.io/helm-charts
helm repo update
helm install scheduler -n crane-system --create-namespace crane/scheduler
offline install
helm install scheduler -n crane-system --create-namespace --set global.prometheusAddr="http://prometheus-k8s.monitoring.svc.cluster.local:9090" ./scheduler-0.2.2.tgz
Configuration
The following table lists the configurable parameters of the Crane-scheduler chart and their default values.
Parameter | Description | Default |
---|---|---|
scheduler.enable |
Whether to deploy Scheduler | true |
scheduler.image.repository |
Image name of Scheduler. | docker.io/gocrane/crane-scheduler |
scheduler.image.tag |
Image tag of Scheduler. Optional, given app version of Helm chart is used by default | 0.0.23 |
scheduler.replicaCount |
Replica count of Scheduler | 1 |
controller.enable |
Whether to deploy Scheduler-controller | true |
controller.image.repository |
Image name of Scheduler-controller. | docker.io/gocrane/crane-scheduler-controller |
controller.image.tag |
Image tag of Scheduler-controller. Optional, given app version of Helm chart is used by default | 0.0.23 |
controller.replicaCount |
Replica count of Scheduler-controller | 1 |
global.prometheusAddr |
Address of Prometheus | http://prometheus-server.crane-system.svc.cluster.local:8080 |
prometheus rule
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
annotations:
labels:
prometheus: k8s
role: alert-rules
name: crane-scheduler
namespace: monitoring
spec:
groups:
- interval: 30s
name: cpu_mem_usage_active
rules:
- expr: 100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[30s]))
* 100)
record: cpu_usage_active
- expr: 100*(1-node_memory_MemAvailable_bytes/node_memory_MemTotal_bytes)
record: mem_usage_active
- interval: 5m
name: cpu-usage-5m
rules:
- expr: max_over_time(cpu_usage_avg_5m[1h])
record: cpu_usage_max_avg_1h
- expr: max_over_time(cpu_usage_avg_5m[1d])
record: cpu_usage_max_avg_1d
- interval: 1m
name: cpu-usage-1m
rules:
- expr: avg_over_time(cpu_usage_active[5m])
record: cpu_usage_avg_5m
- interval: 5m
name: mem-usage-5m
rules:
- expr: max_over_time(mem_usage_avg_5m[1h])
record: mem_usage_max_avg_1h
- expr: max_over_time(mem_usage_avg_5m[1d])
record: mem_usage_max_avg_1d
- interval: 1m
name: mem-usage-1m
rules:
- expr: avg_over_time(mem_usage_active[5m])
record: mem_usage_avg_5m
Uninstall
helm uninstall scheduler -n crane-system