-
Notifications
You must be signed in to change notification settings - Fork 735
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
add docs for dapr annotate command #2576
Changes from 1 commit
17548ed
c818840
f8c5e97
42a5c31
b219617
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,84 @@ | ||||||
--- | ||||||
type: docs | ||||||
title: "annotate CLI command reference" | ||||||
linkTitle: "annotate" | ||||||
description: "Add dapr annotatations to a Kubernetes configuration" | ||||||
--- | ||||||
|
||||||
{{% alert title="Warning" color="warning" %}} | ||||||
This command is in preview. The functionality might change in the future till the command is made stable. | ||||||
{{% /alert %}} | ||||||
|
||||||
### Description | ||||||
|
||||||
Add dapr annotations to a Kubernetes configuration. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I presume arguments here reflects this list https://v1-8.docs.dapr.io/reference/arguments-annotations-overview/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the above is true (the list) then I suggest the following update.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @msfussell I believe that this command as it exists is not for all the annotations as it exists. I am also thinking that all annotations should not be supported via this command. I am planning on creating a proposal to change this command to follow a helm based |
||||||
|
||||||
### Supported platforms | ||||||
|
||||||
- [Kubernetes]({{< ref kubernetes >}}) | ||||||
|
||||||
### Usage | ||||||
|
||||||
```bash | ||||||
dapr annotate [flags] CONFIG-FILE | ||||||
``` | ||||||
|
||||||
### Flags | ||||||
|
||||||
| Name | Environment Variable | Default | Description | ||||||
| --- | --- | --- | --- | | ||||||
| `--api-token-secret` | | | The secret to use for the API token | | ||||||
| `--app-id, -a` | | | The app id to annotate | | ||||||
| `--app-max-concurrency` | | `-1` | The maximum number of concurrent requests to allow | | ||||||
| `--app-port, -p` | | `-1` | The port to expose the app on | | ||||||
| `--app-protocol` | | | The protocol to use for the app | | ||||||
| `--app-ssl` | | `false` | Enable SSL for the app | | ||||||
| `--app-token-secret` | | | The secret to use for the app token | | ||||||
| `--config, -c` | | | The config file to annotate | | ||||||
| `--cpu-limit` | | | The CPU limit to set for the sidecar. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). | | ||||||
| `--cpu-request` | | | The CPU request to set for the sidecar. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/). | | ||||||
| `--dapr-image` | | | The image to use for the dapr sidecar container | | ||||||
| `--enable-debug` | | `false` | Enable debug | | ||||||
| `--enable-metrics` | | `false` | Enable metrics | | ||||||
| `--enable-profile` | | `false` | Enable profiling | | ||||||
| `--env` | | | Environment variables to set (key value pairs, comma separated) | | ||||||
| `--graceful-shutdown-seconds` | | `-1` | The number of seconds to wait for the app to shutdown | | ||||||
| `--help, -h` | | | help for annotate | | ||||||
| `--http-stream-request-body` | | `false` | Enable streaming request body for HTTP | | ||||||
| `--listen-addresses` | | | The addresses for sidecar to listen on. To listen to all IPv4 addresses, use `0.0.0.0`. To listen to all IPv6 addresses, use `[::]`. | | ||||||
| `--liveness-probe-delay` | | `-1` | The delay for sidecar to use for the liveness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--liveness-probe-period` | | `-1` | The period used by the sidecar for the liveness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--liveness-probe-threshold` | | `-1` | The threshold used by the sidecar for the liveness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--liveness-probe-timeout` | | `-1` | The timeout used by the sidecar for the liveness probe. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--log-level` | | | The log level to use | | ||||||
| `--max-request-body-size` | | `-1` | The maximum request body size to use | | ||||||
| `--memory-limit` | | | The memory limit to set for the sidecar. See valid values [here](https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/quota-memory-cpu-namespace/) | | ||||||
| `--memory-request`| | | The memory request to set for the sidecar | | ||||||
| `--metrics-port` | | `-1` | The port to expose the metrics on | | ||||||
| `--namespace, -n` | | | The namespace the resource target is in (can only be set if `--resource` is also set) | | ||||||
| `--readiness-probe-delay` | | `-1` | The delay to use for the readiness probe in the sidecar. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes).| | ||||||
| `--readiness-probe-period` | | `-1` | The period to use for the readiness probe in the sidecar. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--readiness-probe-threshold` | | `-1` | The threshold to use for the readiness probe in the sidecar. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--readiness-probe-timeout` | | `-1` | The timeout to use for the readiness probe in the sidecar. Read more [here](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes). | | ||||||
| `--resource, -r` | | | The resource to target to annotate | | ||||||
mukundansundar marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is --resource? When is this used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See examples with the
More examples in the file ... |
||||||
|
||||||
{{% alert title="Warning" color="warning" %}} | ||||||
If an application ID is not provided using `--app-id, -a`, we will generate one using the format `<namespace>-<kind>-<name>`. | ||||||
mukundansundar marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
{{% /alert %}} | ||||||
|
||||||
### Examples | ||||||
|
||||||
```bash | ||||||
# Annotate the first deployment found in the input | ||||||
kubectl get deploy -l app=node -o yaml | dapr annotate - | kubectl apply -f - | ||||||
|
||||||
# Annotate multiple deployments by name in a chain | ||||||
kubectl get deploy -o yaml | dapr annotate -r nodeapp - | dapr annotate -r pythonapp - | kubectl apply -f - | ||||||
|
||||||
# Annotate deployment in a specific namespace from file or directory by name | ||||||
dapr annotate -r nodeapp -n namespace mydeploy.yaml | kubectl apply -f - | ||||||
|
||||||
# Annotate deployment from url by name | ||||||
dapr annotate -r nodeapp --log-level debug https://raw.githubusercontent.com/dapr/quickstarts/master/tutorials/hello-kubernetes/deploy/node.yaml | kubectl apply -f - | ||||||
``` | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaving this as such for now only with a slight change in phrasing ... will have a discussion with Yaron after 1.8 release on whether to have Preview features or Preview commands in CLI or not ...
cc @msfussell @yaron2