Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure fine-granular PriorityClasses for all components #5634

Closed
35 tasks done
vpnachev opened this issue Mar 23, 2022 · 28 comments
Closed
35 tasks done

Configure fine-granular PriorityClasses for all components #5634

vpnachev opened this issue Mar 23, 2022 · 28 comments
Assignees
Labels
area/high-availability High availability related area/ops-productivity Operator productivity related (how to improve operations) area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension

Comments

@vpnachev
Copy link
Member

vpnachev commented Mar 23, 2022

How to categorize this issue?

/area high-availability ops-productivity quality
/kind enhancement

What would you like to be added:

Configure priorityclass for the Gardener components

With the new plan from #5634 (comment):

Why is this needed:
These are components with high importance for a gardener landscape and shouldn't be evicted by pods with lower importance that have higher pod priority.

@vpnachev vpnachev added the kind/enhancement Enhancement, improvement, extension label Mar 23, 2022
@gardener-robot gardener-robot added area/high-availability High availability related area/ops-productivity Operator productivity related (how to improve operations) area/quality Output qualification (tests, checks, scans, automation in general, etc.) related labels Mar 23, 2022
@ialidzhikov
Copy link
Member

/assign

@ialidzhikov
Copy link
Member

@vpnachev, really nice finding! Thank you for this issue!

@acumino
Copy link
Member

acumino commented May 24, 2022

Maybe we can use this new feature. [Add non-preempting option to PriorityClasses] (kubernetes/enhancements#902.)

@rfranzke
Copy link
Member

rfranzke commented Jun 9, 2022

/unassign @ialidzhikov
/assign @rfranzke

I still plan to take a look and at least come up with a proposal which PriorityClasses should be introduced and how the components should be assigned (either tomorrow or beginning of next week).

@gardener-prow gardener-prow bot assigned rfranzke and unassigned ialidzhikov Jun 9, 2022
@rfranzke
Copy link
Member

rfranzke commented Jun 15, 2022

We discussed out of band that our usage of PriorityClasses is quite confusing today and that we should think whether we can introduce some better concepts to improve the overall robustness of the system.

I looked into this topic and I propose that we introduce the following PriorityClasses and with their respective associations:

Seed Clusters

The seed controller in gardenlet would create the following to-be "well-known" PriorityClasses as part of the seed bootstrapping. Extensions can rely on them/their names.

Name Priority Associated Components
gardener-system-critical 999998950 gardenlet, gardener-resource-manager, istio-ingressgateway, istiod
gardener-system-900 999998900 Extensions, gardener-seed-admission-controller, reversed-vpn-auth-server
gardener-system-800 999998800 dependency-watchdog-endpoint, dependency-watchdog-probe, etcd-druid, (auditlog-)mutator, vpa-admission-controller
gardener-system-700 999998700 auditlog-seed-controller, hvpa-controller, vpa-recommender, vpa-updater
gardener-system-600 999998600 aggregate-alertmanager, alertmanager, fluent-bit, grafana, kube-state-metrics, nginx-ingress-controller, nginx-k8s-backend, prometheus, seed-prometheus, vpa-exporter
gardener-reserve-excess-capacity -5 reserve-excess-capacity (ref)



gardener-system-500 999998500 etcd-events, etcd-main, kube-apiserver
gardener-system-400 999998400 gardener-resource-manager
gardener-system-300 999998300 cloud-controller-manager, cluster-autoscaler, csi-driver-controller, kube-controller-manager, kube-scheduler, machine-controller-manager, terraformer, vpn-seed-server
gardener-system-200 999998200 csi-snapshot-controller, csi-snapshot-validation, cert-controller-manager, shoot-dns-service, vpa-admission-controller, vpa-recommender, vpa-updater
gardener-system-100 999998100 alertmanager, grafana-operators, grafana-users, kube-state-metrics, prometheus, loki

Shoot Clusters

The shoot controller in gardenlet would create the following to-be "well-known" PriorityClasses as part of the shoo reconciliation. Extensions can rely on them/their names.

Name Priority Associated Components
system-node-critical (created by Kubernetes) 2000001000 calico-node, kube-proxy, apiserver-proxy, csi-driver, egress-filter-applier
system-cluster-critical (created by Kubernetes) 2000000000 calico-typha, calico-kube-controllers, coredns, vpn-shoot
gardener-shoot-system-900 999999900 node-problem-detector
gardener-shoot-system-800 999999800 calico-typha-horizontal-autoscaler, calico-typha-vertical-autoscaler
gardener-shoot-system-700 999999700 blackbox-exporter, node-exporter
gardener-shoot-system-600 999999600 addons-nginx-ingress-controller, addons-nginx-ingress-k8s-backend, kubernetes-dashboard, kubernetes-metrics-scraper

Any opinions on this proposal? Let me know if I forgot/missed a component in the tables above.

@timebertt
Copy link
Member

I've updated @rfranzke's proposal after another round of discussion and will start working on it this week.
/unassign @rfranzke
/assign @timebertt

@gardener-prow gardener-prow bot assigned timebertt and unassigned rfranzke Jun 20, 2022
@timebertt
Copy link
Member

One more nit, I noticed in the above proposal:
gardener-system-critical (like all other classes in Seeds) should have less priority than all gardener-shoot-system-* classes, to ensure shoot cluster critical components have higher priority than seed cluster components if we are on a ManagedSeed.
Therefore, I propose to use gardener-system-critical=999998950.

Additionally, I propose to drop gardener-shoot-system-critical in favor of reusing system-cluster-critical for coredns and vpn-shoot and system-node-critical for egress-filter-applier.

WDYT?

@rfranzke
Copy link
Member

Therefore, I propose to use gardener-system-critical=999998950.

Yes, sounds good, I think we talked about this in our meeting but didn't adapt the values accordingly.

Additionally, I propose to drop gardener-shoot-system-critical in favor of reusing system-cluster-critical for coredns and vpn-shoot and system-node-critical for egress-filter-applier.

Fine for me, although this will create a slight asymmetry 😉

@timebertt timebertt changed the title Configure priorityclass for the Gardener components Configure fine-granular PriorityClasses for all components Jun 24, 2022
@timebertt
Copy link
Member

/unassign
I have completed the first steps in #6186 and listed the remaining steps in the original issue description.

gardener-prow bot pushed a commit that referenced this issue Aug 19, 2022
* Remove gardener-system-critical priority class from MR

* Remove gardenlet pc and use gardener-system-critical-mig pc

gardener-system-critical-mig pc is used instead of gardener-system-critical pc for all components described in  #5634

* Clean gardenlet pc

* Change pc to gardener-system-critical-migration
@shafeeqes
Copy link
Contributor

/close
All tasks are completed.

@gardener-prow gardener-prow bot closed this as completed Oct 2, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 2, 2022

@shafeeqes: Closing this issue.

In response to this:

/close
All tasks are completed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@timebertt
Copy link
Member

/reopen

I just observed that a kube-scheduler pod was preempted by a loki pod, so I noticed that some components were not adapted yet:

$ k get po -o=custom-columns="name:.metadata.name,priorityclass:.spec.priorityClassName"
name                                                   priorityclass
cert-controller-manager-5c647d9bc9-56cwv               gardener-system-200
cloud-controller-manager-86bf56fdcf-bqs6h              gardener-system-300
cluster-autoscaler-5bbbbc9b-vx27w                      <none>
csi-driver-controller-7ffbfdffc-tptkg                  gardener-system-300
csi-snapshot-controller-7595464c96-z8ldr               gardener-system-200
csi-snapshot-validation-859b787d9c-4qf4k               <none>
etcd-events-0                                          gardener-system-500
etcd-main-0                                            gardener-system-500
event-logger-66fd786cdc-jfh6n                          gardener-system-100
gardener-resource-manager-64785d9c95-596t9             gardener-system-400
gardener-resource-manager-64785d9c95-ccms6             gardener-system-400
gardener-resource-manager-64785d9c95-dvbrp             gardener-system-400
grafana-operators-76bb69d65c-r7xnk                     gardener-system-100
grafana-users-8584f55bc5-jsmlh                         gardener-system-100
kube-apiserver-78f7d66fcf-j449b                        gardener-system-500
kube-apiserver-78f7d66fcf-jxgt2                        gardener-system-500
kube-apiserver-78f7d66fcf-wc6rl                        gardener-system-500
kube-controller-manager-6d8697459b-t2czj               gardener-system-300
kube-scheduler-7946565f8f-7r82r                        <none>
kube-state-metrics-74c5544c64-sz8qt                    gardener-system-100
loki-0                                                 gardener-system-100
machine-controller-manager-7bdd655b8f-lqx82            gardener-system-300
network-problem-detector-controller-6f895cfd9b-9vq87   gardener-system-200
prometheus-0                                           gardener-system-100
shoot-dns-service-5cb9bf6c89-mrshz                     <none>
vpa-admission-controller-5bfd4b6d86-nrtt6              gardener-system-200
vpa-recommender-54bffb8dc4-8th7j                       gardener-system-200
vpa-updater-cff9dd4cc-27xvp                            gardener-system-200
vpn-seed-server-699ccc8846-n8ws4                       gardener-system-300

Most importantly, the following components that are configured in this repository were not adapted:

  • cluster-autoscaler
  • kube-scheduler

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 16, 2022

@timebertt: Reopened this issue.

In response to this:

/reopen

I just observed that a kube-scheduler pod was preempted by a loki pod, so I noticed that some components were not adapted yet:

$ k get po -o=custom-columns="name:.metadata.name,priorityclass:.spec.priorityClassName"
name                                                   priorityclass
cert-controller-manager-5c647d9bc9-56cwv               gardener-system-200
cloud-controller-manager-86bf56fdcf-bqs6h              gardener-system-300
cluster-autoscaler-5bbbbc9b-vx27w                      <none>
csi-driver-controller-7ffbfdffc-tptkg                  gardener-system-300
csi-snapshot-controller-7595464c96-z8ldr               gardener-system-200
csi-snapshot-validation-859b787d9c-4qf4k               <none>
etcd-events-0                                          gardener-system-500
etcd-main-0                                            gardener-system-500
event-logger-66fd786cdc-jfh6n                          gardener-system-100
gardener-resource-manager-64785d9c95-596t9             gardener-system-400
gardener-resource-manager-64785d9c95-ccms6             gardener-system-400
gardener-resource-manager-64785d9c95-dvbrp             gardener-system-400
grafana-operators-76bb69d65c-r7xnk                     gardener-system-100
grafana-users-8584f55bc5-jsmlh                         gardener-system-100
kube-apiserver-78f7d66fcf-j449b                        gardener-system-500
kube-apiserver-78f7d66fcf-jxgt2                        gardener-system-500
kube-apiserver-78f7d66fcf-wc6rl                        gardener-system-500
kube-controller-manager-6d8697459b-t2czj               gardener-system-300
kube-scheduler-7946565f8f-7r82r                        <none>
kube-state-metrics-74c5544c64-sz8qt                    gardener-system-100
loki-0                                                 gardener-system-100
machine-controller-manager-7bdd655b8f-lqx82            gardener-system-300
network-problem-detector-controller-6f895cfd9b-9vq87   gardener-system-200
prometheus-0                                           gardener-system-100
shoot-dns-service-5cb9bf6c89-mrshz                     <none>
vpa-admission-controller-5bfd4b6d86-nrtt6              gardener-system-200
vpa-recommender-54bffb8dc4-8th7j                       gardener-system-200
vpa-updater-cff9dd4cc-27xvp                            gardener-system-200
vpn-seed-server-699ccc8846-n8ws4                       gardener-system-300

Most importantly, the following components that are configured in this repository were not adapted:

  • cluster-autoscaler
  • kube-scheduler

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rfranzke
Copy link
Member

/unassign @acumino
/assign @ialidzhikov

@ialidzhikov
Copy link
Member

ialidzhikov commented Oct 17, 2022

@ialidzhikov
Copy link
Member

/close
as the items from #5634 (comment) are completed

@gardener-prow gardener-prow bot closed this as completed Oct 17, 2022
@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 17, 2022

@ialidzhikov: Closing this issue.

In response to this:

/close
as the items from #5634 (comment) are completed

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rfranzke
Copy link
Member

/reopen
for cleanup
due to #6799

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 25, 2022

@rfranzke: Reopened this issue.

In response to this:

/reopen
for cleanup
due to #6799

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ialidzhikov
Copy link
Member

/close
as #6899 is merged

@gardener-prow
Copy link
Contributor

gardener-prow bot commented Oct 31, 2022

@ialidzhikov: Closing this issue.

In response to this:

/close
as #6899 is merged

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/high-availability High availability related area/ops-productivity Operator productivity related (how to improve operations) area/quality Output qualification (tests, checks, scans, automation in general, etc.) related kind/enhancement Enhancement, improvement, extension
Projects
None yet
Development

No branches or pull requests

8 participants