Skip to content

Commit

Permalink
Merge pull request #44 from ZEISS/add-config
Browse files Browse the repository at this point in the history
add config value
  • Loading branch information
salaboy authored Jan 16, 2024
2 parents d5eebca + 7c88584 commit 87dc6de
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 12 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ By running `daprd` as a Kubernetes `DaemonSet` resource, the `daprd` container w

For each Dapr Application, you need to deploy this chart using different `shared.appId`s.


## Getting Started

Before installing Dapr Shared, please ensure you have Dapr installed in your cluster.
Before installing Dapr Shared, please ensure you have Dapr installed in your cluster.

If you want to get started with Dapr Shared, you can easily create a new Dapr Shared instance by installing the official Helm Chart:

Expand All @@ -32,8 +31,8 @@ Where `<DAPR_APP_ID>` is the Dapr App Id that you can use in your components (fo


## Customize Dapr Shared
Customize Dapr Shared using custom Helm values

Customize Dapr Shared using custom Helm values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand All @@ -53,6 +52,7 @@ Customize Dapr Shared using custom Helm values
| shared.daprd.mtls.enabled | bool | `false` | Enables automatic mTLS for daprd to daprd communication channels. |
| shared.daprd.publicPort | int | `3501` | The HTTP public port for the Dapr API. |
| shared.daprd.token | string | `""` | Dapr API token to use for token based API authentication. |
| shared.daprd.config | string | `""` | Name of Dapr configuration specification to be used. |
| shared.deployment.replicas | int | `1` | The quantity of replicas. This property is set only when `shared.strategy` is equal to `deployment` |
| shared.initContainer.image.name | string | `"dapr-shared"` | The dapr-shared image name. |
| shared.initContainer.image.pullPolicy | string | `"Always"` | The init container pull policy. |
Expand All @@ -68,7 +68,8 @@ Customize Dapr Shared using custom Helm values
| shared.serviceAccount.name | string | `""` | Kubernetes Service Account name. |
| shared.strategy | string | `"daemonset"` | The default strategy to run dapr in shared mode. Possible values `daemonset`, `deployment`. |

----------------------------------------------
---

Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)

### Building from source
Expand All @@ -79,4 +80,3 @@ You can run the following command to build containers for the `dapr-shared` prox
```
ko build --platform=linux/amd64,linux/arm64
```

1 change: 1 addition & 0 deletions chart/dapr-shared/templates/_daemondeployshared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
- --enable-mtls={{ .Values.shared.daprd.mtls.enabled }}
- --enable-api-logging={{ .Values.shared.daprd.apiLogging.enabled }}
- --app-channel-address={{ .Values.shared.remoteURL }}
- --config={{ .Values.shared.daprd.config }}
env:
- name: DAPR_TRUST_ANCHORS
valueFrom:
Expand Down
12 changes: 12 additions & 0 deletions chart/dapr-shared/tests/daemonset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,15 @@ tests:
path: spec.template.spec.nodeSelector.agentpool
value: backend

- it: when shared.daprd.config is given, it should be set
values:
- ./values/required.yaml
set:
shared:
strategy: daemonset
daprd:
config: appconfig
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--config=appconfig"
12 changes: 12 additions & 0 deletions chart/dapr-shared/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,15 @@ tests:
path: spec.template.spec.nodeSelector.agentpool
value: backend

- it: when shared.daprd.config is given, it should be set
values:
- ./values/required.yaml
set:
shared:
strategy: deployment
daprd:
config: appconfig
asserts:
- contains:
path: spec.template.spec.containers[0].args
content: "--config=appconfig"
16 changes: 9 additions & 7 deletions chart/dapr-shared/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ shared:
namespace: "dapr-system"
# -- Trust Domain used by the Dapr Control Plane
trustDomain: "cluster.local"
serviceAccount:
serviceAccount:
# -- Allows the option to create or not the service account.
create: true
create: true
# -- Kubernetes Service Account name.
name: ""
# Kubernetes Service Account annotations.
annotations: {}
service:
# -- The daprd service type.
type: "ClusterIP"
type: "ClusterIP"
initContainer:
# -- The dapr API token.
token: ""
image:
image:
# -- The dapr-shared image registry.
registry: "docker.io/daprio"
# -- The dapr-shared image name.
Expand All @@ -56,7 +56,9 @@ shared:
# -- The HTTP public port for the Dapr API.
publicPort: 3501
# -- Comma separated list of IP addresses that daprd will listen to. Defaults to all in standalone mode. Defaults to [::1],127.0.0.1 in Kubernetes. To listen to all IPv4 addresses, use 0.0.0.0. To listen to all IPv6 addresses, use [::].
listenAddresses: "0.0.0.0"
listenAddresses: "0.0.0.0"
# -- name of configuration
config: ""
image:
# -- Daprd image registry.
registry: "docker.io/daprio"
Expand All @@ -76,9 +78,9 @@ shared:
enabled: false
apiLogging:
# -- Enables API logging for the daprd.
enabled: true
enabled: true
# @ignored
tolerations:
tolerations:
# these tolerations are to have the daemonset runnable on control plane nodes
# remove them if your control plane nodes should not run pods
# @ignored
Expand Down

0 comments on commit 87dc6de

Please sign in to comment.