Adding pod priority for all the components. (#3361)

* Changes to assign pod priority to kube components.

* Removed the boolean flag pod_priority_assignment

* Created new priorityclass k8s-cluster-critical

* Created new priorityclass k8s-cluster-critical

* Fixed the trailing spaces

* Fixed the trailing spaces

* Added kube version check while creating Priority Class k8s-cluster-critical

* Moved k8s-cluster-critical.yml

* Moved k8s-cluster-critical.yml to kube_config_dir
This commit is contained in:
Kuldip Madnani
2018-09-25 09:50:22 -05:00
committed by k8s-ci-robot
parent 8526c30b63
commit 36898a2c39
37 changed files with 129 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
---
apiVersion: scheduling.k8s.io/v1beta1
kind: PriorityClass
metadata:
name: k8s-cluster-critical
value: 1000000000
globalDefault: false
description: "This priority class should only be used by the pods installed using kubespray."

View File

@@ -174,3 +174,20 @@
when:
- cloud_provider is defined
- cloud_provider == 'oci'
- name: PriorityClass | Copy k8s-cluster-critical-pc.yml file
copy: src=k8s-cluster-critical-pc.yml dest={{ kube_config_dir }}/k8s-cluster-critical-pc.yml
when:
- kube_version|version_compare('v1.11.1', '>=')
- inventory_hostname == groups['kube-master'][0]
- name: PriorityClass | Create k8s-cluster-critical
kube:
name: k8s-cluster-critical
kubectl: "{{bin_dir}}/kubectl"
resource: "PriorityClass"
filename: "{{ kube_config_dir }}/k8s-cluster-critical-pc.yml"
state: latest
when:
- kube_version|version_compare('v1.11.1', '>=')
- inventory_hostname == groups['kube-master'][0]