Files
iris-context/commands/ops/dapr.go
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

79 lines
5.7 KiB
Go

package ops
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "dapr",
Description: "Distributed Application Runtime CLI",
Subcommands: []spec.Subcommand{
{Name: "build-info", Description: "Print build info of Dapr CLI and runtime"},
{Name: "completion", Description: "Generates shell completion scripts"},
{Name: "bash", Description: "Generates bash completion scripts"},
{Name: "fish", Description: "Generates fish completion scripts"},
{Name: "powershell", Description: "Generates powershell completion scripts"},
{Name: "zsh", Description: "Generates zsh completion scripts"},
{Name: "components", Description: "List all Dapr components. Supported platforms: Kubernetes"},
{Name: "configurations", Description: "List all Dapr configurations. Supported platforms: Kubernetes"},
{Name: "dashboard", Description: "Start Dapr dashboard. Supported platforms: Kubernetes and self-hosted"},
{Name: "invoke", Description: "Invoke a method on a given Dapr application. Supported platforms: Self-hosted"},
{Name: "list", Description: "List all Dapr instances. Supported platforms: Kubernetes and self-hosted"},
{Name: "logs", Description: "Get Dapr sidecar logs for an application. Supported platforms: Kubernetes"},
{Name: "mtls", Description: "Check if mTLS is enabled. Supported platforms: Kubernetes"},
{Name: "expiry", Description: "Checks the expiry of the root certificate"},
{Name: "export", Description: "Export the root CA, issuer cert and key from Kubernetes to local files"},
{Name: "renew-cert", Description: "Rotates the Dapr root certificate on your Kubernetes cluster"},
{Name: "publish", Description: "Publish a pub-sub event. Supported platforms: Self-hosted"},
{Name: "status", Description: "Show the health status of Dapr services. Supported platforms: Kubernetes"},
{Name: "stop", Description: "Stop Dapr instances and their associated apps. Supported platforms: Self-hosted"},
{Name: "uninstall", Description: "Uninstall Dapr runtime. Supported platforms: Kubernetes and self-hosted"},
{Name: "version", Description: "Print the Dapr runtime and CLI version"},
{Name: "help", Description: "Help about any command"},
},
Options: []spec.Option{
{Name: "--api-token-secret", Description: "The secret to use for the API token"},
{Name: "--app-id", Description: "The app id to annotate"},
{Name: "--app-max-concurrency", Description: "The maximum number of concurrent requests to allow"},
{Name: "--app-port", Description: "The port to expose the app on"},
{Name: "--app-protocol", Description: "The protocol to use for the app. Allowed values http, https, h2c, grpc, grpcs"},
{Name: "--app-ssl", Description: "Enable SSL for the app"},
{Name: "--app-token-secret", Description: "The secret to use for the app token"},
{Name: "--config", Description: "The config file to annotate"},
{Name: "--cpu-limit", Description: "The CPU limit to set"},
{Name: "--cpu-request", Description: "The CPU request to set"},
{Name: "--dapr-image", Description: "The image to use for the dapr sidecar container"},
{Name: "--enable-api-logging", Description: "Enable API logging for the Dapr sidecar"},
{Name: "--enable-debug", Description: "Enable debug"},
{Name: "--enable-metrics", Description: "Enable metrics"},
{Name: "--enable-profile", Description: "Enable profiling"},
{Name: "--env", Description: "Environment variables to set (key value pairs, comma separated)"},
{Name: "--graceful-shutdown-seconds", Description: "The number of seconds to wait for the app to shutdown"},
{Name: "--http-read-buffer-size", Description: "The maximum size of HTTP header read buffer in kilobytes"},
{Name: "--http-stream-request-body", Description: "Enable streaming request body for HTTP"},
{Name: "--kubernetes", Description: "Apply annotations to Kubernetes resources"},
{Name: "--listen-addresses", Description: "The addresses to listen on"},
{Name: "--liveness-probe-delay", Description: "The delay to use for the liveness probe"},
{Name: "--liveness-probe-period", Description: "The period to use for the liveness probe"},
{Name: "--liveness-probe-threshold", Description: "The threshold to use for the liveness probe"},
{Name: "--liveness-probe-timeout", Description: "The timeout to use for the liveness probe"},
{Name: "--log-as-json", Description: "Log as JSON"},
{Name: "--log-level", Description: "The log level to use"},
{Name: "--max-request-body-size", Description: "The maximum request body size to use"},
{Name: "--memory-limit", Description: "The memory limit to set"},
{Name: "--memory-request", Description: "The memory request to set"},
{Name: "--metrics-port", Description: "The port to expose the metrics on"},
{Name: "--namespace", Description: "Comma separated list of addresses for Dapr actor placement servers"},
{Name: "--readiness-probe-delay", Description: "The delay to use for the readiness probe"},
{Name: "--readiness-probe-period", Description: "The period to use for the readiness probe"},
{Name: "--readiness-probe-threshold", Description: "The threshold to use for the readiness probe"},
{Name: "--readiness-probe-timeout", Description: "The timeout to use for the readiness probe"},
{Name: "--resource", Description: "The resource to target to annotate"},
{Name: "--unix-domain-socket-path", Description: "Linux domain socket path to use for communicating with the Dapr sidecar"},
{Name: "--volume-mounts", Description: "List of pod volumes to be mounted to the sidecar container in read-only mode"},
{Name: "--volume-mounts-rw", Description: "List of pod volumes to be mounted to the sidecar container in read-write mode"},
},
})
}