CLI for Maestro ManifestWork lifecycle management.
make build
# Binary: bin/maestro-cliThe build system automatically injects version information using ldflags:
# Default build (uses git info)
make build
# Override version/commit
make build VERSION=1.2.3 GIT_COMMIT=abc123
# Manual build with ldflags
go build -ldflags="-X github.com/openshift-hyperfleet/maestro-cli/cmd.Version=1.2.3 \
-X github.com/openshift-hyperfleet/maestro-cli/cmd.Commit=abc123 \
-X github.com/openshift-hyperfleet/maestro-cli/cmd.Date=2024-01-01T10:00:00Z" \
./cmd/maestro-cli
# Check version info
./bin/maestro-cli version| Environment Variable | Description | Default |
|---|---|---|
MAESTRO_GRPC_ENDPOINT |
gRPC server address | localhost:8090 |
MAESTRO_HTTP_ENDPOINT |
HTTP API endpoint | http://localhost:8000 |
MAESTRO_SOURCE_ID |
Source ID for CloudEvents | maestro-cli |
--grpc-endpoint string Maestro gRPC server address
--http-endpoint string Maestro HTTP API endpoint
--grpc-insecure Skip TLS verification
--timeout duration Operation timeout (default: 5m)
--output string Output format: yaml, json (default: yaml)
--results-path string Path to write results for status-reporter
--verbose Enable debug logging
Apply a ManifestWork to a target cluster.
# Apply without waiting
maestro-cli apply --manifest-file=manifest.yaml --consumer=agent1
# Apply and wait for Available condition (default)
maestro-cli apply --manifest-file=manifest.yaml --consumer=agent1 --wait
# Apply and wait for specific condition
maestro-cli apply --manifest-file=job.yaml --consumer=agent1 --wait="Job:Complete"
# Apply and wait for complex condition
maestro-cli apply --manifest-file=job.yaml --consumer=agent1 \
--wait="Job:Complete OR Job:Failed" --timeout=10mDelete a ManifestWork.
# Delete a ManifestWork
maestro-cli delete --name=my-manifestwork --consumer=agent1
# Delete and wait for completion
maestro-cli delete --name=my-manifestwork --consumer=agent1 --wait
# Dry run
maestro-cli delete --name=my-manifestwork --consumer=agent1 --dry-runList all ManifestWorks for a consumer.
# List all ManifestWorks
maestro-cli list --consumer=agent1
# Filter by manifest content
maestro-cli list --consumer=agent1 --filter=nginx
maestro-cli list --consumer=agent1 --filter=Deployment/default/nginx
# Output as JSON
maestro-cli list --consumer=agent1 --output=jsonShow detailed information about a ManifestWork.
maestro-cli describe --name=my-manifestwork --consumer=agent1Get a ManifestWork definition.
# Get as YAML
maestro-cli get --name=my-manifestwork --consumer=agent1
# Get as JSON
maestro-cli get --name=my-manifestwork --consumer=agent1 --output=jsonWait for a ManifestWork to reach a condition (like kubectl wait).
# Wait for Available condition (default)
maestro-cli wait --name=my-manifestwork --consumer=agent1
# Wait for specific condition
maestro-cli wait --name=my-job --consumer=agent1 --for="Job:Complete"
# Wait with timeout
maestro-cli wait --name=my-job --consumer=agent1 \
--for="Job:Complete OR Job:Failed" --timeout=10mContinuously stream ManifestWork status changes (like kubectl get --watch).
# Watch status changes
maestro-cli watch --name=my-manifestwork --consumer=agent1
# Watch with custom poll interval
maestro-cli watch --name=my-manifestwork --consumer=agent1 --poll-interval=5sValidate a ManifestWork file without applying.
maestro-cli validate --manifest-file=manifest.yamlCompare local ManifestWork with remote state.
maestro-cli diff --manifest-file=manifest.yaml --consumer=agent1The --wait and --for flags support condition expressions:
# ManifestWork-level conditions
--wait="Available"
--wait="Applied"
# Resource-specific conditions (from statusFeedback)
--wait="Job:Complete"
--wait="Job/test-job-1:Failed"
# Logical expressions
--wait="Job:Complete OR Job:Failed"
--wait="Available AND Job:Complete"# Full workflow: apply, wait, then check status
maestro-cli apply --manifest-file=job.yaml --consumer=agent1 \
--wait="Job:Complete OR Job:Failed" \
--results-path=/tmp/result.json \
--timeout=10m
# Check result
cat /tmp/result.jsonApache License 2.0