diff --git a/README.md b/README.md index 8fb452d..2b07fd5 100644 --- a/README.md +++ b/README.md @@ -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: @@ -32,8 +31,8 @@ Where `` 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 | |-----|------|---------|-------------| @@ -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. | @@ -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 @@ -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 ``` - diff --git a/chart/dapr-shared/templates/_daemondeployshared.yaml b/chart/dapr-shared/templates/_daemondeployshared.yaml index eca2c49..861b992 100644 --- a/chart/dapr-shared/templates/_daemondeployshared.yaml +++ b/chart/dapr-shared/templates/_daemondeployshared.yaml @@ -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: diff --git a/chart/dapr-shared/tests/daemonset_test.yaml b/chart/dapr-shared/tests/daemonset_test.yaml index baca025..b4e6fa7 100644 --- a/chart/dapr-shared/tests/daemonset_test.yaml +++ b/chart/dapr-shared/tests/daemonset_test.yaml @@ -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" diff --git a/chart/dapr-shared/tests/deployment_test.yaml b/chart/dapr-shared/tests/deployment_test.yaml index 76e78ca..12935cb 100644 --- a/chart/dapr-shared/tests/deployment_test.yaml +++ b/chart/dapr-shared/tests/deployment_test.yaml @@ -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" diff --git a/chart/dapr-shared/values.yaml b/chart/dapr-shared/values.yaml index c87f8c9..a0c1be4 100644 --- a/chart/dapr-shared/values.yaml +++ b/chart/dapr-shared/values.yaml @@ -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. @@ -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" @@ -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