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

high priority class name recommendation #4178

Merged
merged 24 commits into from
Jun 19, 2024
Merged
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
20ae2b2
add high priority class name recommendation for production
filintod Jun 1, 2024
9f215ea
add resourcequota info for older dapr
filintod Jun 2, 2024
9d280d3
fix doc
filintod Jun 2, 2024
f2bc026
minor refactor, try to avoid collission with chart resource name
filintod Jun 3, 2024
9ca676c
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
07ab2ed
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
0189cd4
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
5fc9388
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
1505c3a
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
81b3135
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
8fa6902
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
2d67252
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
c5e920b
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
d626c44
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
56de990
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 3, 2024
3c6ae2e
Merge branch 'v1.14' into filinto/high-priority-class-name
filintod Jun 5, 2024
87a14ab
Merge branch 'v1.14' into filinto/high-priority-class-name
filintod Jun 10, 2024
0346c5a
Merge branch 'v1.14' into filinto/high-priority-class-name
filintod Jun 14, 2024
167e5f7
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 17, 2024
a9ac8be
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 17, 2024
4ce666f
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
filintod Jun 17, 2024
2c41332
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
msfussell Jun 19, 2024
f16b376
Update daprdocs/content/en/operations/hosting/kubernetes/kubernetes-p…
msfussell Jun 19, 2024
31eb31a
Merge branch 'v1.14' into filinto/high-priority-class-name
msfussell Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,48 @@ For a new Dapr deployment, HA mode can be set with both:

For an existing Dapr deployment, [you can enable HA mode in a few extra steps]({{< ref "#enabling-high-availability-in-an-existing-dapr-deployment" >}}).

## Cluster Critical Priority Class Name

In some scenarios, nodes may have memory and/or cpu pressure and the Dapr control plane pods might get selected
for eviction. To prevent this, you can set a critical priority class name for the Dapr control plane pods. This ensures that
the Dapr control plane pods are not evicted unless all other pods with lower priority are evicted.

Learn more about [Protecting Mission-Critical Pods](https://kubernetes.io/blog/2023/01/12/protect-mission-critical-pods-priorityclass/).

There are two built-in critical priority classes in Kubernetes:
- `system-cluster-critical`
- `system-node-critical` (highest priority)

It's recommended to set the `priorityClassName` to `system-cluster-critical` for the Dapr control plane pods.

For a new Dapr deployment, `system-cluster-critical` priority class mode can be set via the helm value `global.priorityClassName`.

For a new Dapr deployment, this priority class can be set with both the Dapr CLI and Helm charts,
using the helm `--set global.priorityClassName=system-cluster-critical` argument.

#### Dapr version < 1.14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question. Why version 1.14 and below? What is different from 1.14 onwards, is this set for you by default? It does not say.

Copy link
Contributor Author

@filintod filintod Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the 1.14 chart now adds this automatically for the user.


For versions of Dapr < 1.14, it's recommended that you add a `ResourceQuota` to the Dapr control plane namespace. This prevents
problems associated with scheduling pods [where the cluster may be configured](https://kubernetes.io/docs/concepts/policy/resource-quotas/#limit-priority-class-consumption-by-default )
with limitations on which pods can be assigned high priority classes.

If you have Dapr installed in namespace `dapr-system`, you can create a `ResourceQuota` with the following content:

```yaml
apiVersion: v1
kind: ResourceQuota
metadata:
name: dapr-system-critical-quota
namespace: dapr-system
spec:
scopeSelector:
matchExpressions:
- operator : In
scopeName: PriorityClass
values: [system-cluster-critical]
```


## Deploy Dapr with Helm

[Visit the full guide on deploying Dapr with Helm]({{< ref "kubernetes-deploy.md#install-with-helm-advanced" >}}).
Expand Down
Loading