77 lines
2 KiB
Text
77 lines
2 KiB
Text
|
{% set params = "" -%}
|
||
|
|
||
|
{% set log_level = pillar['log_level'] -%}
|
||
|
{% if pillar['scheduler_test_log_level'] is defined -%}
|
||
|
{% set log_level = pillar['scheduler_test_log_level'] -%}
|
||
|
{% endif -%}
|
||
|
|
||
|
{% set feature_gates = "" -%}
|
||
|
{% if grains.feature_gates is defined -%}
|
||
|
{% set feature_gates = "--feature-gates=" + grains.feature_gates -%}
|
||
|
{% endif -%}
|
||
|
|
||
|
{% set scheduling_algorithm_provider = "" -%}
|
||
|
{% if grains.scheduling_algorithm_provider is defined -%}
|
||
|
{% set scheduling_algorithm_provider = "--algorithm-provider=" + grains.scheduling_algorithm_provider -%}
|
||
|
{% endif -%}
|
||
|
|
||
|
{% set params = params + log_level + " " + feature_gates + " " + scheduling_algorithm_provider -%}
|
||
|
|
||
|
# test_args has to be kept at the end, so they'll overwrite any prior configuration
|
||
|
{% if pillar['scheduler_test_args'] is defined -%}
|
||
|
{% set params = params + " " + pillar['scheduler_test_args'] -%}
|
||
|
{% endif -%}
|
||
|
|
||
|
{
|
||
|
"apiVersion": "v1",
|
||
|
"kind": "Pod",
|
||
|
"metadata": {
|
||
|
"name":"kube-scheduler",
|
||
|
"namespace": "kube-system",
|
||
|
"labels": {
|
||
|
"tier": "control-plane",
|
||
|
"component": "kube-scheduler"
|
||
|
}
|
||
|
},
|
||
|
"spec":{
|
||
|
"hostNetwork": true,
|
||
|
"containers":[
|
||
|
{
|
||
|
"name": "kube-scheduler",
|
||
|
"image": "{{pillar['kube_docker_registry']}}/kube-scheduler:{{pillar['kube-scheduler_docker_tag']}}",
|
||
|
"resources": {
|
||
|
"requests": {
|
||
|
"cpu": "100m"
|
||
|
}
|
||
|
},
|
||
|
"command": [
|
||
|
"/bin/sh",
|
||
|
"-c",
|
||
|
"/usr/local/bin/kube-scheduler --master=127.0.0.1:8080 {{params}} 1>>/var/log/kube-scheduler.log 2>&1"
|
||
|
],
|
||
|
"livenessProbe": {
|
||
|
"httpGet": {
|
||
|
"host": "127.0.0.1",
|
||
|
"port": 10251,
|
||
|
"path": "/healthz"
|
||
|
},
|
||
|
"initialDelaySeconds": 15,
|
||
|
"timeoutSeconds": 15
|
||
|
},
|
||
|
"volumeMounts": [
|
||
|
{
|
||
|
"name": "logfile",
|
||
|
"mountPath": "/var/log/kube-scheduler.log",
|
||
|
"readOnly": false
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"volumes":[
|
||
|
{ "name": "logfile",
|
||
|
"hostPath": {
|
||
|
"path": "/var/log/kube-scheduler.log"}
|
||
|
}
|
||
|
]
|
||
|
}}
|