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

Helm: Add option to deploy Placement with zero replicas #7253

Merged
merged 38 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0ff69fa
Helm: Add option to deploy Placement with zero replicas
ItalyPaleAle Nov 29, 2023
5ece9e5
Merge branch 'master' into placement-scale-zero
dapr-bot Nov 30, 2023
4a95e2a
Merge branch 'master' into placement-scale-zero
dapr-bot Nov 30, 2023
db10cc0
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 4, 2023
cb0dd13
Merge branch 'master' of https://github.com/dapr/dapr into placement-…
ItalyPaleAle Dec 4, 2023
57a71b9
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 5, 2023
1872c1f
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 5, 2023
9f9011e
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 6, 2023
35cfc24
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 6, 2023
e55b618
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 11, 2023
ab9d36f
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 12, 2023
5c1a025
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 13, 2023
4dfe7a4
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 16, 2023
2d1ac1c
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 19, 2023
155142b
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 19, 2023
3f3ac3a
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 20, 2023
e33246a
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 20, 2023
a5cdaca
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 20, 2023
33181e3
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 20, 2023
972569d
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 20, 2023
6b0095b
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 21, 2023
9f921fe
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 22, 2023
53987a6
Merge branch 'master' into placement-scale-zero
dapr-bot Dec 22, 2023
355f1f5
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 2, 2024
648e6e8
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 4, 2024
17b5c34
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 4, 2024
9f19c38
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 8, 2024
a079471
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 9, 2024
f6edfad
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 9, 2024
8c58a49
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 9, 2024
7e18c7c
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 9, 2024
1a0c5fe
Merge branch 'master' into placement-scale-zero
mukundansundar Jan 9, 2024
0cd1ee5
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 10, 2024
e30a3e2
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 10, 2024
feee7ca
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 10, 2024
46e4108
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 11, 2024
de62ddf
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 11, 2024
21518b4
Merge branch 'master' into placement-scale-zero
dapr-bot Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 25 additions & 24 deletions charts/dapr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,36 +135,37 @@ The Helm chart has the follow configuration options that can be supplied:
| `dapr_operator.extraEnvVars` | Map of (name, value) tuples to use as extra environment variables (e.g. `my-env-var: "my-val"`, etc) | `{}` |

### Dapr Placement options:
| Parameter | Description | Default |
|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|
| `dapr_placement.ha` | If set to true, deploys the Placement service with 3 nodes regardless of the value of `global.ha.enabled` | `false` |
| `dapr_placement.replicationFactor` | Number of consistent hashing virtual node | `100` |
| `dapr_placement.logLevel` | Service Log level | `info` |
| `dapr_placement.image.name` | Service docker image name (`global.registry/dapr_placement.image.name`) | `dapr` |
| `dapr_placement.cluster.forceInMemoryLog` | Use in-memory log store and disable volume attach when HA is true | `false` |
| `dapr_placement.cluster.logStorePath` | Mount path for persistent volume for log store in unix-like system when HA is true | `/var/run/dapr/raft-log` |
| `dapr_placement.cluster.logStoreWinPath` | Mount path for persistent volume for log store in windows when HA is true | `C:\\raft-log` |
| `dapr_placement.volumeclaims.storageSize` | Attached volume size | `1Gi` |
| `dapr_placement.volumeclaims.storageClassName` | storage class name | |
| `dapr_placement.maxActorApiLevel` | Sets the `max-api-level` flag which prevents the Actor API level from going above this value. The Placement service reports to all connected hosts the Actor API level as the minimum value observed in all actor hosts in the cluster. Actor hosts with a lower API level than the current API level in the cluster will not be able to connect to Placement. Setting a cap helps making sure that older versions of Dapr can connect to Placement as actor hosts, but may limit the capabilities of the actor subsystem. The default value of -1 means no cap. | `-1` |
| `dapr_placement.minActorApiLevel` | Sets the `min-api-level` flag, which enforces a minimum value for the Actor API level in the cluster. | `0` |
| `dapr_placement.runAsNonRoot` | Boolean value for `securityContext.runAsNonRoot`. Does not apply unless `forceInMemoryLog` is set to `true`. You may have to set this to `false` when running in Minikube | `false` |
| `dapr_placement.resources` | Value of `resources` attribute. Can be used to set memory/cpu resources/limits. See the section "Resource configuration" above. Defaults to empty | `{}` |
| `dapr_placement.debug.enabled` | Boolean value for enabling debug mode | `{}` |
| `dapr_placement.metadataEnabled` | Boolean value for enabling placement tables metadata HTTP API | `false` |
| `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` |
| `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` |
| `dapr_placement.extraEnvVars` | Map of (name, value) tuples to use as extra environment variables (e.g. `my-env-var: "my-val"`, etc) | `{}` |
| Parameter | Description | Default |
|---|---|---|
| `dapr_placement.ha`| If set to true, deploys the Placement service with 3 nodes regardless of the value of `global.ha.enabled` | `false` |
| `dapr_placement.replicationFactor` | Number of consistent hashing virtual node | `100`|
| `dapr_placement.logLevel` | Service Log level | `info`|
| `dapr_placement.image.name` | Service docker image name (`global.registry/dapr_placement.image.name`) | `dapr` |
| `dapr_placement.cluster.forceInMemoryLog` | Use in-memory log store and disable volume attach when HA is true | `false` |
| `dapr_placement.cluster.logStorePath` | Mount path for persistent volume for log store in unix-like system when HA is true | `/var/run/dapr/raft-log` |
| `dapr_placement.cluster.logStoreWinPath` | Mount path for persistent volume for log store in windows when HA is true | `C:\\raft-log` |
| `dapr_placement.volumeclaims.storageSize` | Attached volume size | `1Gi` |
| `dapr_placement.volumeclaims.storageClassName` | Storage class name ||
| `dapr_placement.maxActorApiLevel` | Sets the `max-api-level` flag which prevents the Actor API level from going above this value. The Placement service reports to all connected hosts the Actor API level as the minimum value observed in all actor hosts in the cluster. Actor hosts with a lower API level than the current API level in the cluster will not be able to connect to Placement. Setting a cap helps making sure that older versions of Dapr can connect to Placement as actor hosts, but may limit the capabilities of the actor subsystem. The default value of -1 means no cap. | `-1` |
| `dapr_placement.minActorApiLevel` | Sets the `min-api-level` flag, which enforces a minimum value for the Actor API level in the cluster. | `0` |
| `dapr_placement.scaleZero` | If true, the StatefulSet is deployed with a zero scale, regardless of the values of `global.ha.enabled` or `dapr_placement.ha` | `false` |
| `dapr_placement.runAsNonRoot` | Boolean value for `securityContext.runAsNonRoot`. Does not apply unless `forceInMemoryLog` is set to `true`. You may have to set this to `false` when running in Minikube | `false` |
| `dapr_placement.resources` | Value of `resources` attribute. Can be used to set memory/cpu resources/limits. See the section "Resource configuration" above. Defaults to empty | `{}` |
| `dapr_placement.debug.enabled` | Boolean value for enabling debug mode | `{}` |
| `dapr_placement.metadataEnabled` | Boolean value for enabling placement tables metadata HTTP API | `false` |
| `dapr_placement.statefulsetAnnotations` | Custom annotations for Dapr Placement Statefulset | `{}` |
| `dapr_placement.service.annotations` | Custom annotations for "dapr-placement-server" Service resource | `{}` |
| `dapr_placement.extraEnvVars` | Dictionary (key: value pairs) to use as extra environment variables in the injected sidecar containers (e.g. `my-env-var: "my-val"`, etc) | `{}` |

### Dapr RBAC options:
| Parameter | Description | Default |
|-------------------------------------------|-------------------------------------------------------------------------|-------------------------|
| Parameter | Description | Default |
|---|---|---|
| `dapr_rbac.secretReader.enabled` | Deploys a default secret reader Role and RoleBinding | `true` |
| `dapr_rbac.secretReader.namespace` | Namespace for the default secret reader | `default` |

### Dapr Sentry options:
| Parameter | Description | Default |
|-------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------|
| Parameter | Description | Default |
|---|---|---|
| `dapr_sentry.replicaCount` | Number of replicas | `1` |
| `dapr_sentry.logLevel` | Log level | `info` |
| `dapr_sentry.image.name` | Docker image name (`global.registry/dapr_sentry.image.name`) | `dapr` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ metadata:
{{ $key }}: {{ tpl $value $ }}
{{- end }}
spec:
{{- if or (eq .Values.global.ha.enabled true) (eq .Values.ha true) }}
{{- if eq .Values.scaleZero true }}
replicas: 0
{{- else if or (eq .Values.global.ha.enabled true) (eq .Values.ha true) }}
replicas: 3
{{- else }}
replicas: 1
Expand Down
1 change: 1 addition & 0 deletions charts/dapr/charts/dapr_placement/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ ports:
apiPort: 50005
raftRPCPort: 8201

scaleZero: false
ha: false

maxActorApiLevel: -1
Expand Down