diff --git a/daprdocs/content/en/_index.md b/daprdocs/content/en/_index.md index 6ca2cff4c..fd2858b3d 100644 --- a/daprdocs/content/en/_index.md +++ b/daprdocs/content/en/_index.md @@ -8,12 +8,12 @@ no_list: true
DaprCon logo - Join us for DaprCon on October 19th-20th, 2021! + Watch DaprCon sessions on-demand!

- The first ever DaprCon will take place October 19th-20th, 2021 virtually! Tune in for free and attend technical sessions, panels and real world examples from the community on building applications with Dapr!

Learn more >> + The first ever DaprCon took place October 19th-20th, 2021. Read this recap and find links to all on-demand content

Learn more >>

- +
diff --git a/daprdocs/content/en/contributing/contributing-docs.md b/daprdocs/content/en/contributing/contributing-docs.md index 1e73bda86..16567f2fc 100644 --- a/daprdocs/content/en/contributing/contributing-docs.md +++ b/daprdocs/content/en/contributing/contributing-docs.md @@ -334,6 +334,8 @@ The shortcode would be: To create a button in a webpage, use the `button` shortcode. +An optional "newtab" parameter will indicate if the page should open in a new tab. Options are "true" or "false". Default is "false", where the page will open in the same tab. + #### Link to an external page ``` @@ -346,10 +348,10 @@ To create a button in a webpage, use the `button` shortcode. You can also reference pages in your button as well: ``` -{{}} +{{}} ``` -{{< button text="My Button" page="contributing" >}} +{{< button text="My Button" page="contributing" newtab="true" >}} #### Button colors diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index 20f49f250..ca2c4289d 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -486,6 +486,33 @@ If you want to use your own custom CloudEvent, make sure to specify the content Read about content types [here](#content-types), and about the [Cloud Events message format]({{< ref "pubsub-overview.md#cloud-events-message-format" >}}). +#### Example + +{{< tabs "Dapr CLI" "HTTP API (Bash)" "HTTP API (PowerShell)">}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```bash +dapr publish --publish-app-id testpubsub --pubsub pubsub --topic deathStarStatus --data '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' +``` +{{% /codetab %}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```bash +curl -X POST http://localhost:3500/v1.0/publish/pubsub/deathStarStatus -H "Content-Type: application/cloudevents+json" -d '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' +``` +{{% /codetab %}} + +{{% codetab %}} +Publish a custom CloudEvent to the `deathStarStatus` topic: +```powershell +Invoke-RestMethod -Method Post -ContentType 'application/cloudevents+json' -Body '{"specversion" : "1.0", "type" : "com.dapr.cloudevent.sent", "source" : "testcloudeventspubsub", "subject" : "Cloud Events Test", "id" : "someCloudEventId", "time" : "2021-08-02T09:00:00Z", "datacontenttype" : "application/cloudevents+json", "data" : {"status": "completed"}}' -Uri 'http://localhost:3500/v1.0/publish/pubsub/deathStarStatus' +``` +{{% /codetab %}} + +{{< /tabs >}} + ## Next steps - Try the [Pub/Sub quickstart sample](https://github.com/dapr/quickstarts/tree/master/pub-sub) @@ -494,4 +521,4 @@ Read about content types [here](#content-types), and about the [Cloud Events mes - Learn about [message time-to-live]({{< ref pubsub-message-ttl.md >}}) - Learn [how to configure Pub/Sub components with multiple namespaces]({{< ref pubsub-namespaces.md >}}) - List of [pub/sub components]({{< ref setup-pubsub >}}) -- Read the [API reference]({{< ref pubsub_api.md >}}) +- Read the [API reference]({{< ref pubsub_api.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md index f4697792d..c9cac3b05 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-upgrade.md @@ -49,14 +49,26 @@ Then proceed with the `dapr upgrade --runtime-version {{% dapr-latest-version lo From version 1.0.0 onwards, upgrading Dapr using Helm is no longer a disruptive action since existing certificate values will automatically be re-used. -1. Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > v1.0.0: +1. Upgrade Dapr from 1.0.0 (or newer) to any [NEW VERSION] > 1.0.0: + + *Helm does not handle upgrading CRDs, so you need to perform that manually. CRDs are backward-compatible and should only be installed forward.* + + >Note: The Dapr version is included in the commands below. + + For version {{% dapr-latest-version long="true" %}}: + + ```bash + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/components.yaml + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/configuration.yaml + kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v{{% dapr-latest-version long="true" %}}/charts/dapr/crds/subscription.yaml + ``` ```bash helm repo update ``` ```bash - helm upgrade dapr dapr/dapr --version [NEW VERSION] --namespace dapr-system --wait + helm upgrade dapr dapr/dapr --version {{% dapr-latest-version long="true" %}} --namespace dapr-system --wait ``` *If you're using a values file, remember to add the `--values` option when running the upgrade command.* diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md index 04eae4780..6929238ed 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/blobstorage.md @@ -32,6 +32,8 @@ spec: value: - name: getBlobRetryCount value: + - name: publicAccessLevel + value: ``` {{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). @@ -46,6 +48,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | container | Y | Output | The name of the Blob Storage container to write to | `myexamplecontainer` | | decodeBase64 | N | Output | Configuration to decode base64 file content before saving to Blob Storage. (In case of saving a file with binary content). `true` is the only allowed positive value. Other positive variations like `"True", "1"` are not acceptable. Defaults to `false` | `true`, `false` | | getBlobRetryCount | N | Output | Specifies the maximum number of HTTP GET requests that will be made while reading from a RetryReader Defaults to `10` | `1`, `2` +| publicAccessLevel | N | Output | Specifies whether data in the container may be accessed publicly and the level of access (only used if the container is created by Dapr). Defaults to `none` | `blob`, `container`, `none` ## Binding support diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md index 70d6d9599..44649f354 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/cron.md @@ -59,6 +59,20 @@ For ease of use, the Dapr cron binding also supports few shortcuts: * `@every 15s` where `s` is seconds, `m` minutes, and `h` hours * `@daily` or `@hourly` which runs at that period from the time the binding is initialized +## Listen to the cron binding + +After setting up the cron binding, all you need to do is listen on an endpoint that matches the name of your component. Assume the [NAME] is `scheduled`. This will be made as a HTTP `POST` request. The below example shows how a simple Node.js Express application can receive calls on the `/scheduled` endpoint and write a message to the console. + +```js +app.post('/scheduled', async function(req, res){ + console.log("scheduled endpoint called", req.body) + res.status(200).send() +}); +``` + +When running this code, note that the `/scheduled` endpoint is called every five minutes by the Dapr sidecar. + + ## Binding support This component supports both **input and output** binding interfaces. diff --git a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md index e3d759f39..11a1de338 100644 --- a/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md +++ b/daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md @@ -25,7 +25,7 @@ spec: - name: namespace value: - name: resyncPeriodInSec - vale: "" + value: "" ``` ## Spec metadata fields diff --git a/daprdocs/content/en/reference/environment/_index.md b/daprdocs/content/en/reference/environment/_index.md index 7eb1bf339..f60d7d256 100644 --- a/daprdocs/content/en/reference/environment/_index.md +++ b/daprdocs/content/en/reference/environment/_index.md @@ -15,6 +15,6 @@ The following table lists the environment variables used by the Dapr runtime, CL | APP_API_TOKEN | Your application | The token used by the application to authenticate requests from Dapr API. Read [authenticate requests from Dapr using token authentication]({{< ref app-api-token >}}) for more information. | | DAPR_HTTP_PORT | Your application | The HTTP port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self hosted or injected by the dapr-sidecar-injector into all the containers in the pod. | | DAPR_GRPC_PORT | Your application | The gRPC port that the Dapr sidecar is listening on. Your application should use this variable to connect to Dapr sidecar instead of hardcoding the port value. Set by the Dapr CLI run command for self hosted or injected by the dapr-sidecar-injector into all the containers in the pod. | -| DAPR_METRICS_PORT | Your application | The HTTP [Prometheus]({{< ref prometheus >}}) port that Dapr sends its metrics information to. Your application can use this variable to send its application specific metrics to have both Dapr metrics and application metrics together. See [metrics-port] ({{< ref arguments-annotations-overview>}}) for more information | +| DAPR_METRICS_PORT | Your application | The HTTP [Prometheus]({{< ref prometheus >}}) port that Dapr sends its metrics information to. Your application can use this variable to send its application specific metrics to have both Dapr metrics and application metrics together. See [metrics-port]({{< ref arguments-annotations-overview>}}) for more information | | DAPR_API_TOKEN | Dapr sidecar | The token used for Dapr API authentication for requests from the application. Read [enable API token authentication in Dapr]({{< ref api-token >}}) for more information. | | NAMESPACE | Dapr sidecar | Used to specify a component's [namespace in self-hosted mode]({{< ref component-scopes >}}) | diff --git a/daprdocs/layouts/shortcodes/button.html b/daprdocs/layouts/shortcodes/button.html index 5ab0ddc9b..24419146c 100644 --- a/daprdocs/layouts/shortcodes/button.html +++ b/daprdocs/layouts/shortcodes/button.html @@ -2,7 +2,8 @@ {{ $page := .Get "page" }} {{ $link := .Get "link" | default "#" }} {{ $text := .Get "text" }} +{{ $newtab := .Get "newtab" | default "false" }} {{- if $page -}}{{- $link = ref . $page -}}{{- end -}} -{{ $text }} +{{ $text }}