constants

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Docker    = "docker"
	Buildpack = "buildpack"
)
View Source
const (
	LabelNamespace   = "openchoreo.dev/namespace"
	LabelProject     = "openchoreo.dev/project"
	LabelComponent   = "openchoreo.dev/component"
	LabelName        = "openchoreo.dev/name"
	LabelType        = "openchoreo.dev/type"
	LabelVersion     = "openchoreo.dev/version"
	LabelArtifact    = "openchoreo.dev/deployment-artifact"
	LabelDeployment  = "openchoreo.dev/deployment"
	LabelEnvironment = "openchoreo.dev/environment"
)
View Source
const (
	AnnotationDescription = "openchoreo.dev/description"
	AnnotationDisplayName = "openchoreo.dev/display-name"
)
View Source
const (
	OutputFormatYAML = "yaml"
	NamespaceKind    = "Namespace"
	ProjectKind      = "Project"
	ComponentKind    = "Component"
	WorkloadKind     = "Workload"
)
View Source
const (
	ChoreoGroup = "openchoreo.dev"
)

Variables

View Source
var (
	NamespaceV1Config = CRDConfig{
		Group:   "",
		Version: V1,
		Kind:    NamespaceKind,
	}
	ProjectV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    ProjectKind,
	}
	ComponentV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    ComponentKind,
	}
	WorkloadV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    WorkloadKind,
	}
	DeployableArtifactV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "DeployableArtifact",
	}
	DeploymentV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "Deployment",
	}
	DataPlaneV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "DataPlane",
	}
	EndpointV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "Endpoint",
	}
	EnvironmentV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "Environment",
	}
	DeploymentPipelineV1Config = CRDConfig{
		Group:   ChoreoGroup,
		Version: V1Alpha1,
		Kind:    "DeploymentPipeline",
	}
)
View Source
var (
	Login = Command{
		Use:   "login",
		Short: "Login to OpenChoreo CLI",
		Long:  "Login to OpenChoreo CLI",
	}

	Logout = Command{
		Use:   "logout",
		Short: "Logout from OpenChoreo CLI",
	}

	Version = Command{
		Use:   "version",
		Short: "Print version information",
		Long:  "Print version information.",
	}

	Create = Command{
		Use:   "create",
		Short: "Create OpenChoreo resources",
		Long: fmt.Sprintf(`Create OpenChoreo resources like namespaces, projects, and components.

Examples:
  # Create a project in a namespace
  %[1]s create project --namespace acme-corp --name online-store

  # Create a component in a project
  %[1]s create component --namespace acme-corp --project online-store --name product-catalog \
   --git-repository-url https://github.com/org/repo`, messages.DefaultCLIName),
	}

	List = Command{
		Use:     "get",
		Short:   "List OpenChoreo resources",
		Aliases: []string{"list"},
		Long: fmt.Sprintf(`List OpenChoreo resources like namespaces, projects, and components.

Examples:
  # List all namespaces
  %[1]s get namespace

  # List projects in a namespace
  %[1]s get project --namespace acme-corp

  # List components in a project
  %[1]s get component --namespace acme-corp --project online-store

  # Output namespace details in YAML format
  %[1]s get namespace -o yaml`,
			messages.DefaultCLIName),
	}

	Apply = Command{
		Use:   "apply",
		Short: "Apply OpenChoreo resources by file name",
		Long: fmt.Sprintf(`Apply a configuration file to create or update OpenChoreo resources.

	Examples:
	  # Apply a namespace configuration
	  %[1]s apply -f namespace.yaml`,
			messages.DefaultCLIName),
	}

	CreateProject = Command{
		Use:     "project",
		Aliases: []string{"proj", "projects"},
		Short:   "Create a project",
		Long: fmt.Sprintf(`Create a new project in a namespace.

Examples:
  # Create a project in a specific namespace
  %[1]s create project --namespace acme-corp --name online-store`,
			messages.DefaultCLIName),
	}

	CreateComponent = Command{
		Use:     "component",
		Aliases: []string{"comp", "components"},
		Short:   "Create a new component in a project",
		Long: fmt.Sprintf(`Create a new component in the specified project and namespace.

Examples:
  # Create a component with Git repository
  %[1]s create component --name product-catalog --namespace acme-corp --project online-store \
    --display-name "Product Catalog" --git-repository-url https://github.com/acme-corp/product-catalog --type Service

  # Create a component with build configuration
  %[1]s create component --name product-catalog --namespace acme-corp --project online-store \
    --type Service --git-repository-url https://github.com/acme-corp/product-catalog --branch main \
	--path / --docker-context ./src --dockerfile-path ./src/Dockerfile`,
			messages.DefaultCLIName),
	}

	CreateNamespace = Command{
		Use:     "namespace",
		Aliases: []string{"namespaces", "ns"},
		Short:   "Create a namespace",
		Long: fmt.Sprintf(`Create a new namespace in Choreo.

Examples:
  # Create a namespace with specific details
  %[1]s create namespace --name acme-corp --display-name "ACME" --description "ACME Corporation"`,
			messages.DefaultCLIName),
	}

	CreateWorkload = Command{
		Use:   "create",
		Short: "Create a workload from a descriptor file",
		Long: fmt.Sprintf(`Create a workload from a workload descriptor file.

The workload descriptor (workload.yaml) should be located alongside your source code
and describes the endpoints and configuration for your workload.

Examples:
  # Create workload from descriptor
  %[1]s workload create workload.yaml --namespace acme-corp --project online-store \
    --component product-catalog --image myimage:latest

  # Create workload and save to file
  %[1]s workload create workload.yaml -o acme-corp -p online-store -c product-catalog \
    --image myimage:latest --output workload-cr.yaml`,
			messages.DefaultCLIName),
	}

	Scaffold = Command{
		Use:   "scaffold",
		Short: "Generate scaffolded resource YAML files",
		Long: fmt.Sprintf(`Generate scaffolded resource YAML files from existing CRDs.

Examples:
  # Scaffold a component from a ComponentType
  %[1]s scaffold component my-app --componenttype deployment/web-app`, messages.DefaultCLIName),
	}

	ScaffoldComponent = Command{
		Use:   "scaffold COMPONENT_NAME",
		Short: "Scaffold a Component YAML from ComponentType and Traits",
		Long: fmt.Sprintf(`Generate a Component YAML file based on a ComponentType definition.

The command fetches the ComponentType and any specified Traits from the cluster,
applies default values, and generates a YAML file with required fields as
placeholders and optional fields as commented examples.

Use --type/--traits/--workflow for namespace-scoped resources, or
--clustercomponenttype/--clustertraits/--clusterworkflow for cluster-scoped resources.
Each pair is mutually exclusive.

The --namespace and --project flags can be omitted if set in the current context.

Examples:
  # Scaffold using a cluster-scoped ClusterComponentType
  %[1]s component scaffold my-app --clustercomponenttype deployment/web-app

  # Scaffold using a namespace-scoped ComponentType
  %[1]s component scaffold my-app --componenttype deployment/web-app

  # Scaffold with cluster-scoped traits
  %[1]s component scaffold my-app --clustercomponenttype deployment/web-app --clustertraits storage,ingress

  # Scaffold with cluster-scoped workflow
  %[1]s component scaffold my-app --clustercomponenttype deployment/web-app --clusterworkflow docker-build

  # Output to file
  %[1]s component scaffold my-app --clustercomponenttype deployment/web-app -o my-app.yaml`, messages.DefaultCLIName),
	}

	ListNamespace = Command{
		Use:   "list",
		Short: "List namespaces",
		Long:  `List all namespaces.`,
		Example: `  # List all namespaces
  occ namespace list`,
	}

	GetNamespace = Command{
		Use:   "get [NAMESPACE_NAME]",
		Short: "Get a namespace",
		Long:  `Get a namespace and display its details in YAML format.`,
		Example: `  # Get a namespace
  occ namespace get acme-corp`,
	}

	DeleteNamespace = Command{
		Use:   "delete [NAMESPACE_NAME]",
		Short: "Delete a namespace",
		Long:  `Delete a namespace by name.`,
		Example: `  # Delete a namespace
  occ namespace delete acme-corp`,
	}

	ListProject = Command{
		Use:   "list",
		Short: "List projects",
		Long:  `List all projects in a namespace.`,
		Example: `  # List all projects in a namespace
  occ project list --namespace acme-corp`,
	}

	GetProject = Command{
		Use:   "get [PROJECT_NAME]",
		Short: "Get a project",
		Long:  `Get a project and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a project
  %[1]s project get my-project --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteProject = Command{
		Use:   "delete [PROJECT_NAME]",
		Short: "Delete a project",
		Long:  `Delete a project by name.`,
		Example: fmt.Sprintf(`  # Delete a project
  %[1]s project delete my-project --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListComponent = Command{
		Use:   "list",
		Short: "List components",
		Long:  `List all components in a project.`,
		Example: `  # List all components in a project
  occ component list --namespace acme-corp --project online-store`,
	}

	GetComponent = Command{
		Use:   "get [COMPONENT_NAME]",
		Short: "Get a component",
		Long:  `Get a component and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a component
  %[1]s component get my-component --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteComponent = Command{
		Use:   "delete [COMPONENT_NAME]",
		Short: "Delete a component",
		Long:  `Delete a component by name.`,
		Example: fmt.Sprintf(`  # Delete a component
  %[1]s component delete my-component --namespace acme-corp`, messages.DefaultCLIName),
	}

	Logs = Command{
		Use:     "logs",
		Aliases: []string{"log"},
		Short:   "Get logs for Choreo resources",
		Long: `Get logs for Choreo resources such as build and deployment.

This command allows you to:
- Stream logs in real-time
- Get logs from a specific build or deployment
- Follow log output`,
		Example: `  # Get logs from a specific build
  occ logs --type build --build product-catalog-build-01 --namespace acme-corp --project online-store \
  --component product-catalog

  # Get logs from a specific deployment
  occ logs --type deployment --deployment product-catalog-dev-01 --namespace acme-corp --project online-store \
  --component product-catalog --environment development

  # Get last 100 lines of logs from a specific build
  occ logs --type build --build product-catalog-build-01 --namespace acme-corp --project online-store \
  --component product-catalog --tail 100

  # Stream logs from a specific build
  occ logs --type build --build product-catalog-build-01 --namespace acme-corp --project online-store \
   --component product-catalog --follow
  `,
	}

	ListDeployableArtifact = Command{
		Use:     "deployableartifact",
		Aliases: []string{"deployableartifacts"},
		Short:   "List deployable artifacts",
		Long: `List all deployable artifacts in the current project or namespace.
`,
		Example: `  # List all deployable artifacts
		  occ get deployableartifact

		  # List deployable artifacts for a specific component
		  occ get deployableartifact  --namespace acme-corp --project online-store --component product-catalog

		  # List deployable artifacts in yaml format
		  occ get deployableartifact --namespace acme-corp --project online-store --component product-catalog -o yaml
`,
	}
	ListDeployment = Command{
		Use:     "deployment",
		Aliases: []string{"deployments", "deploy"},
		Short:   "List deployments",
		Long: `List all deployments in the current project or namespace.

This command allows you to:
- List all deployments
- Filter by namespace, project, and component
- Filter by environment and deployment track
- View deployments in different output formats`,
		Example: `  # List all deployments
  occ get deployment

  # List deployments for a specific component
  occ get deployment --namespace acme-corp --project online-store --component product-catalog

  # List deployments for a specific environment
  occ get deployment --namespace acme-corp --project online-store --component product-catalog \
  --environment dev

  # List deployments for a specific deployment track
  occ get deployment --namespace acme-corp --project online-store --component product-catalog \
   --deployment-track main

  # List deployments in yaml format
  occ get deployment -o yaml --namespace acme-corp --project product-catalog

  # List details of a specific deployment
  occ get deployment product-catalog-dev-01 --namespace acme-corp --project online-store \
   --component product-catalog`,
	}

	CreateDeployment = Command{
		Use:     "deployment",
		Aliases: []string{"deployments", "deploy"},
		Short:   "Create a deployment",
		Long:    `Create a deployment in the specified namespace, project and component.`,
		Example: `  # Create a deployment with specific parameters
  occ create deployment --name product-catalog-dev-01 --namespace acme-corp --project online-store \
    --component product-catalog --environment development --deployableartifact product-catalog-artifact`,
	}

	ListEnvironment = Command{
		Use:   "list",
		Short: "List environments",
		Long:  `List all environments in a namespace.`,
		Example: `  # List all environments in a namespace
  occ environment list --namespace acme-corp`,
	}

	GetEnvironment = Command{
		Use:   "get [ENVIRONMENT_NAME]",
		Short: "Get an environment",
		Long:  `Get an environment and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get an environment
  %[1]s environment get dev --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteEnvironment = Command{
		Use:   "delete [ENVIRONMENT_NAME]",
		Short: "Delete an environment",
		Long:  `Delete an environment by name.`,
		Example: fmt.Sprintf(`  # Delete an environment
  %[1]s environment delete dev --namespace acme-corp`, messages.DefaultCLIName),
	}

	CreateDataPlane = Command{
		Use:     "dataplane",
		Aliases: []string{"dp", "dataplanes"},
		Short:   "Create a data plane",
		Long:    `Create a data plane in the specified namespace.`,
		Example: `  # Create a data plane with specific parameters
  occ create dataplane --name primary-dataplane --namespace acme-corp --cluster-name k8s-cluster-01 \
    --connection-config kubeconfig --enable-cilium --enable-scale-to-zero --gateway-type envoy \
    --public-virtual-host api.example.com`,
	}

	ListDataPlane = Command{
		Use:   "list",
		Short: "List data planes",
		Long:  `List all data planes in a namespace.`,
		Example: `  # List all data planes in a namespace
  occ dataplane list --namespace acme-corp`,
	}

	GetDataPlane = Command{
		Use:   "get [DATAPLANE_NAME]",
		Short: "Get a data plane",
		Long:  `Get a data plane and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a data plane
  %[1]s dataplane get primary-dataplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteDataPlane = Command{
		Use:   "delete [DATAPLANE_NAME]",
		Short: "Delete a data plane",
		Long:  `Delete a data plane by name.`,
		Example: fmt.Sprintf(`  # Delete a data plane
  %[1]s dataplane delete primary-dataplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListEndpoint = Command{
		Use:     "endpoint [name]",
		Aliases: []string{"ep", "endpoints"},
		Short:   "List endpoints",
		Long:    `List all endpoints in a namespace, project, component, and environment.`,
		Example: `  # List all endpoints
  occ get endpoint --namespace acme-corp --project online-store --component product-catalog \
  --environment dev

  # List a specific endpoint
  occ get endpoint product-ep --namespace acme-corp --project online-store --component product-catalog \
   --environment dev

  # Output endpoint details in YAML format
  occ get endpoint --namespace acme-corp --project online-store --component product-catalog \
  --environment development -o yaml`,
	}

	CreateEnvironment = Command{
		Use:     "environment",
		Aliases: []string{"env", "environments"},
		Short:   "Create an environment",
		Long:    `Create an environment in the specified namespace.`,
		Example: `  # Create a development environment
  occ create environment --name dev --namespace acme-corp --dataplane-ref primary-dataplane --dns-prefix dev

  # Create a production environment
  occ create environment --name production --namespace acme-corp --dataplane-ref primary-dataplane \
    --dns-prefix prod --production`,
	}

	CreateDeployableArtifact = Command{
		Use:     "deployableartifact",
		Aliases: []string{"da", "artifact"},
		Short:   "Create a deployable artifact",
		Long:    `Create a deployable artifact in the specified namespace, project and component.`,
		Example: `  # Create a deployable artifact from a build
  occ create deployableartifact --name product-catalog-artifact --namespace acme-corp \
    --project online-store --component product-catalog --build product-catalog-build-01

  # Create a deployable artifact from an image
  occ create deployableartifact --name product-catalog-artifact --namespace acme-corp \
    --project online-store --component product-catalog --from-image-ref product-catalog:latest`,
	}

	CreateDeploymentPipeline = Command{
		Use:     "deploymentpipeline",
		Aliases: []string{"deppipe", "deploymentpipelines"},
		Short:   "Create a deployment pipeline",
		Long:    `Create a deployment pipeline in the specified namespace.`,
		Example: `  # Create a deployment pipeline with specific parameters
  occ create deploymentpipeline --name dev-stage-prod --namespace acme-corp \
   --environment-order "development,staging,production"`,
	}

	ListDeploymentPipeline = Command{
		Use:     "deploymentpipeline [name]",
		Aliases: []string{"deppipe", "deploymentpipelines"},
		Short:   "List deployment pipelines",
		Long:    `List all deployment pipelines or a specific deployment pipeline in a namespace.`,
		Example: `  # List all deployment pipelines
  occ get deploymentpipeline --namespace acme-corp

  # List a specific deployment pipeline
  occ get deploymentpipeline default --namespace acme-corp

  # Output deployment pipeline details in YAML format
  occ get deploymentpipeline --namespace acme-corp -o yaml`,
	}

	DeploymentPipelineRoot = Command{
		Use:     "deploymentpipeline",
		Aliases: []string{"deppipe", "deploymentpipelines"},
		Short:   "Manage deployment pipelines",
		Long:    `Manage deployment pipelines for OpenChoreo.`,
	}

	ListDeploymentPipelineDirect = Command{
		Use:   "list",
		Short: "List deployment pipelines",
		Long:  `List all deployment pipelines in a namespace.`,
		Example: `  # List all deployment pipelines in a namespace
  occ deploymentpipeline list --namespace acme-corp`,
	}

	GetDeploymentPipeline = Command{
		Use:   "get [DEPLOYMENT_PIPELINE_NAME]",
		Short: "Get a deployment pipeline",
		Long:  `Get a deployment pipeline and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a deployment pipeline
  %[1]s deploymentpipeline get my-pipeline --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteDeploymentPipeline = Command{
		Use:   "delete [DEPLOYMENT_PIPELINE_NAME]",
		Short: "Delete a deployment pipeline",
		Long:  `Delete a deployment pipeline by name.`,
		Example: fmt.Sprintf(`  # Delete a deployment pipeline
  %[1]s deploymentpipeline delete my-pipeline --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListWorkflowPlane = Command{
		Use:   "list",
		Short: "List workflow planes",
		Long:  `List all workflow planes in a namespace.`,
		Example: `  # List all workflow planes in a namespace
  occ workflowplane list --namespace acme-corp`,
	}

	GetWorkflowPlane = Command{
		Use:   "get [WORKFLOWPLANE_NAME]",
		Short: "Get a workflow plane",
		Long:  `Get a workflow plane and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a workflow plane
  %[1]s workflowplane get primary-workflowplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteWorkflowPlane = Command{
		Use:   "delete [WORKFLOWPLANE_NAME]",
		Short: "Delete a workflow plane",
		Long:  `Delete a workflow plane by name.`,
		Example: fmt.Sprintf(`  # Delete a workflow plane
  %[1]s workflowplane delete primary-workflowplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListObservabilityPlane = Command{
		Use:   "list",
		Short: "List observability planes",
		Long:  `List all observability planes in a namespace.`,
		Example: `  # List all observability planes in a namespace
  occ observabilityplane list --namespace acme-corp`,
	}

	GetObservabilityPlane = Command{
		Use:   "get [OBSERVABILITYPLANE_NAME]",
		Short: "Get an observability plane",
		Long:  `Get an observability plane and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get an observability plane
  %[1]s observabilityplane get primary-observabilityplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteObservabilityPlane = Command{
		Use:   "delete [OBSERVABILITYPLANE_NAME]",
		Short: "Delete an observability plane",
		Long:  `Delete an observability plane by name.`,
		Example: fmt.Sprintf(`  # Delete an observability plane
  %[1]s observabilityplane delete primary-observabilityplane --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListComponentType = Command{
		Use:   "list",
		Short: "List component types",
		Long:  `List all component types available in a namespace.`,
		Example: `  # List all component types in a namespace
  occ componenttype list --namespace acme-corp`,
	}

	GetComponentType = Command{
		Use:   "get [COMPONENT_TYPE_NAME]",
		Short: "Get a component type",
		Long:  `Get a component type and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a component type
  %[1]s componenttype get web-app --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteComponentType = Command{
		Use:   "delete [COMPONENT_TYPE_NAME]",
		Short: "Delete a component type",
		Long:  `Delete a component type by name.`,
		Example: fmt.Sprintf(`  # Delete a component type
  %[1]s componenttype delete web-app --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListTrait = Command{
		Use:   "list",
		Short: "List traits",
		Long:  `List all traits available in a namespace.`,
		Example: `  # List all traits in a namespace
  occ trait list --namespace acme-corp`,
	}

	GetTrait = Command{
		Use:   "get [TRAIT_NAME]",
		Short: "Get a trait",
		Long:  `Get a trait and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a trait
  %[1]s trait get ingress --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteTrait = Command{
		Use:   "delete [TRAIT_NAME]",
		Short: "Delete a trait",
		Long:  `Delete a trait by name.`,
		Example: fmt.Sprintf(`  # Delete a trait
  %[1]s trait delete ingress --namespace acme-corp`, messages.DefaultCLIName),
	}

	ClusterComponentType = Command{
		Use:     "clustercomponenttype",
		Aliases: []string{"cct", "clustercomponenttypes"},
		Short:   "Manage cluster component types",
		Long:    `Manage cluster-scoped component types for OpenChoreo.`,
	}

	ListClusterComponentType = Command{
		Use:   "list",
		Short: "List cluster component types",
		Long:  `List all cluster-scoped component types available across the cluster.`,
		Example: `  # List all cluster component types
  occ clustercomponenttype list`,
	}

	GetClusterComponentType = Command{
		Use:   "get [CLUSTER_COMPONENT_TYPE_NAME]",
		Short: "Get a cluster component type",
		Long:  `Get a cluster component type and display its details in YAML format.`,
		Example: `  # Get a cluster component type
  occ clustercomponenttype get web-app`,
	}

	DeleteClusterComponentType = Command{
		Use:   "delete [CLUSTER_COMPONENT_TYPE_NAME]",
		Short: "Delete a cluster component type",
		Long:  `Delete a cluster component type by name.`,
		Example: `  # Delete a cluster component type
  occ clustercomponenttype delete web-app`,
	}

	ClusterDataPlane = Command{
		Use:     "clusterdataplane",
		Aliases: []string{"clusterdataplanes", "cdp"},
		Short:   "Manage cluster data planes",
		Long:    `Manage cluster-scoped data planes for OpenChoreo.`,
	}

	ListClusterDataPlane = Command{
		Use:   "list",
		Short: "List cluster data planes",
		Long:  `List all cluster-scoped data planes available across the cluster.`,
		Example: `  # List all cluster data planes
  occ clusterdataplane list`,
	}

	GetClusterDataPlane = Command{
		Use:   "get [CLUSTER_DATA_PLANE_NAME]",
		Short: "Get a cluster data plane",
		Long:  `Get a cluster data plane and display its details in YAML format.`,
		Example: `  # Get a cluster data plane
  occ clusterdataplane get default`,
	}

	DeleteClusterDataPlane = Command{
		Use:   "delete [CLUSTER_DATA_PLANE_NAME]",
		Short: "Delete a cluster data plane",
		Long:  `Delete a cluster data plane by name.`,
		Example: `  # Delete a cluster data plane
  occ clusterdataplane delete default`,
	}

	ClusterObservabilityPlane = Command{
		Use:     "clusterobservabilityplane",
		Aliases: []string{"clusterobservabilityplanes", "cop"},
		Short:   "Manage cluster observability planes",
		Long:    `Manage cluster-scoped observability planes for OpenChoreo.`,
	}

	ListClusterObservabilityPlane = Command{
		Use:   "list",
		Short: "List cluster observability planes",
		Long:  `List all cluster-scoped observability planes available across the cluster.`,
		Example: `  # List all cluster observability planes
  occ clusterobservabilityplane list`,
	}

	GetClusterObservabilityPlane = Command{
		Use:   "get [CLUSTER_OBSERVABILITY_PLANE_NAME]",
		Short: "Get a cluster observability plane",
		Long:  `Get a cluster observability plane and display its details in YAML format.`,
		Example: `  # Get a cluster observability plane
  occ clusterobservabilityplane get default`,
	}

	DeleteClusterObservabilityPlane = Command{
		Use:   "delete [CLUSTER_OBSERVABILITY_PLANE_NAME]",
		Short: "Delete a cluster observability plane",
		Long:  `Delete a cluster observability plane by name.`,
		Example: `  # Delete a cluster observability plane
  occ clusterobservabilityplane delete default`,
	}

	ClusterWorkflowPlane = Command{
		Use:     "clusterworkflowplane",
		Aliases: []string{"clusterworkflowplanes", "cwp"},
		Short:   "Manage cluster workflow planes",
		Long:    `Manage cluster-scoped workflow planes for OpenChoreo.`,
	}

	ListClusterWorkflowPlane = Command{
		Use:   "list",
		Short: "List cluster workflow planes",
		Long:  `List all cluster-scoped workflow planes available across the cluster.`,
		Example: `  # List all cluster workflow planes
  occ clusterworkflowplane list`,
	}

	GetClusterWorkflowPlane = Command{
		Use:   "get [CLUSTER_WORKFLOW_PLANE_NAME]",
		Short: "Get a cluster workflow plane",
		Long:  `Get a cluster workflow plane and display its details in YAML format.`,
		Example: `  # Get a cluster workflow plane
  occ clusterworkflowplane get default`,
	}

	DeleteClusterWorkflowPlane = Command{
		Use:   "delete [CLUSTER_WORKFLOW_PLANE_NAME]",
		Short: "Delete a cluster workflow plane",
		Long:  `Delete a cluster workflow plane by name.`,
		Example: `  # Delete a cluster workflow plane
  occ clusterworkflowplane delete default`,
	}

	ClusterTrait = Command{
		Use:     "clustertrait",
		Aliases: []string{"clustertraits"},
		Short:   "Manage cluster traits",
		Long:    `Manage cluster-scoped traits for OpenChoreo.`,
	}

	ListClusterTrait = Command{
		Use:   "list",
		Short: "List cluster traits",
		Long:  `List all cluster-scoped traits available across the cluster.`,
		Example: `  # List all cluster traits
  occ clustertrait list`,
	}

	GetClusterTrait = Command{
		Use:   "get [CLUSTER_TRAIT_NAME]",
		Short: "Get a cluster trait",
		Long:  `Get a cluster trait and display its details in YAML format.`,
		Example: `  # Get a cluster trait
  occ clustertrait get ingress`,
	}

	DeleteClusterTrait = Command{
		Use:   "delete [CLUSTER_TRAIT_NAME]",
		Short: "Delete a cluster trait",
		Long:  `Delete a cluster trait by name.`,
		Example: `  # Delete a cluster trait
  occ clustertrait delete ingress`,
	}

	ClusterWorkflow = Command{
		Use:     "clusterworkflow",
		Aliases: []string{"clusterworkflows"},
		Short:   "Manage cluster workflows",
		Long:    `Manage cluster-scoped workflows for OpenChoreo.`,
	}

	ListClusterWorkflow = Command{
		Use:   "list",
		Short: "List cluster workflows",
		Long:  `List all cluster-scoped workflows available across the cluster.`,
		Example: `  # List all cluster workflows
  occ clusterworkflow list`,
	}

	GetClusterWorkflow = Command{
		Use:   "get [CLUSTER_WORKFLOW_NAME]",
		Short: "Get a cluster workflow",
		Long:  `Get a cluster workflow and display its details in YAML format.`,
		Example: `  # Get a cluster workflow
  occ clusterworkflow get build-go`,
	}

	DeleteClusterWorkflow = Command{
		Use:   "delete [CLUSTER_WORKFLOW_NAME]",
		Short: "Delete a cluster workflow",
		Long:  `Delete a cluster workflow by name.`,
		Example: `  # Delete a cluster workflow
  occ clusterworkflow delete build-go`,
	}

	StartClusterWorkflow = Command{
		Use:   "run CLUSTER_WORKFLOW_NAME",
		Short: "Run a cluster workflow",
		Long: `Run a new cluster workflow with optional parameters.
Requires --namespace to specify where the workflow run will be created.`,
		Example: fmt.Sprintf(`  # Run a cluster workflow
  %[1]s clusterworkflow run dockerfile-builder --namespace acme-corp

  # Run with parameters
  %[1]s clusterworkflow run dockerfile-builder --namespace acme-corp \
    --set spec.workflow.parameters.repository.url=https://github.com/example/repo`, messages.DefaultCLIName),
	}

	LogsClusterWorkflow = Command{
		Use:   "logs CLUSTER_WORKFLOW_NAME",
		Short: "Get logs for a cluster workflow",
		Long: `Get logs for a cluster workflow by finding the latest workflow run.
Use --workflowrun to specify a particular workflow run instead of the latest.`,
		Example: fmt.Sprintf(`  # Get logs for the latest run of a cluster workflow
  %[1]s clusterworkflow logs dockerfile-builder --namespace acme-corp

  # Get logs for a specific run
  %[1]s clusterworkflow logs dockerfile-builder --namespace acme-corp --workflowrun my-run

  # Follow logs
  %[1]s clusterworkflow logs dockerfile-builder --namespace acme-corp -f`, messages.DefaultCLIName),
	}

	ListWorkflow = Command{
		Use:   "list",
		Short: "List workflows",
		Long:  `List all workflows available in a namespace.`,
		Example: `  # List all workflows in a namespace
  occ workflow list --namespace acme-corp`,
	}

	GetWorkflow = Command{
		Use:   "get [WORKFLOW_NAME]",
		Short: "Get a workflow",
		Long:  `Get a workflow and display its details in YAML format.`,
		Example: `  # Get a workflow
  occ workflow get docker --namespace acme-corp`,
	}

	StartWorkflow = Command{
		Use:   "run WORKFLOW_NAME",
		Short: "Run a workflow",
		Long:  `Run a new workflow with optional parameters.`,
		Example: `  # Run a workflow
  occ workflow run database-migration --namespace acme-corp

  # Run with parameters
  occ workflow run github-stats-report --namespace acme-corp \
    --set spec.workflow.parameters.source.org=openchoreo \
    --set spec.workflow.parameters.output.format=json`,
	}

	LogsWorkflow = Command{
		Use:   "logs WORKFLOW_NAME",
		Short: "Get logs for a workflow",
		Long: `Get logs for a workflow by finding the latest workflow run.
Use --workflowrun to specify a particular workflow run instead of the latest.`,
		Example: fmt.Sprintf(`  # Get logs for the latest run of a workflow
  %[1]s workflow logs my-workflow --namespace acme-corp

  # Get logs for a specific run
  %[1]s workflow logs my-workflow --namespace acme-corp --workflowrun my-run

  # Follow logs
  %[1]s workflow logs my-workflow --namespace acme-corp -f`, messages.DefaultCLIName),
	}

	DeleteWorkflow = Command{
		Use:   "delete [WORKFLOW_NAME]",
		Short: "Delete a workflow",
		Long:  `Delete a workflow by name.`,
		Example: fmt.Sprintf(`  # Delete a workflow
  %[1]s workflow delete my-workflow --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListSecretReference = Command{
		Use:   "list",
		Short: "List secret references",
		Long:  `List all secret references in a namespace.`,
		Example: `  # List all secret references in a namespace
  occ secretreference list --namespace acme-corp`,
	}

	GetSecretReference = Command{
		Use:   "get [SECRET_REFERENCE_NAME]",
		Short: "Get a secret reference",
		Long:  `Get a secret reference and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a secret reference
  %[1]s secretreference get my-secret --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteSecretReference = Command{
		Use:   "delete [SECRET_REFERENCE_NAME]",
		Short: "Delete a secret reference",
		Long:  `Delete a secret reference by name.`,
		Example: fmt.Sprintf(`  # Delete a secret reference
  %[1]s secretreference delete my-secret --namespace acme-corp`, messages.DefaultCLIName),
	}

	ClusterAuthzRole = Command{
		Use:     "clusterauthzrole",
		Aliases: []string{"clusterauthzroles", "car"},
		Short:   "Manage cluster authz roles",
		Long:    `Manage cluster-scoped authorization roles for OpenChoreo.`,
	}

	ListClusterAuthzRole = Command{
		Use:   "list",
		Short: "List cluster authz roles",
		Long:  `List all cluster-scoped authorization roles.`,
		Example: `  # List all cluster authz roles
  occ clusterauthzrole list`,
	}

	GetClusterAuthzRole = Command{
		Use:   "get [NAME]",
		Short: "Get a cluster authz role",
		Long:  `Get a cluster authz role and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a cluster authz role
  %[1]s clusterauthzrole get my-role`, messages.DefaultCLIName),
	}

	DeleteClusterAuthzRole = Command{
		Use:   "delete [NAME]",
		Short: "Delete a cluster authz role",
		Long:  `Delete a cluster-scoped authorization role by name.`,
		Example: fmt.Sprintf(`  # Delete a cluster authz role
  %[1]s clusterauthzrole delete my-role`, messages.DefaultCLIName),
	}

	ClusterAuthzRoleBinding = Command{
		Use:     "clusterauthzrolebinding",
		Aliases: []string{"clusterauthzrolebindings", "carb"},
		Short:   "Manage cluster authz role bindings",
		Long:    `Manage cluster-scoped authorization role bindings for OpenChoreo.`,
	}

	ListClusterAuthzRoleBinding = Command{
		Use:   "list",
		Short: "List cluster authz role bindings",
		Long:  `List all cluster-scoped authorization role bindings.`,
		Example: `  # List all cluster authz role bindings
  occ clusterauthzrolebinding list`,
	}

	GetClusterAuthzRoleBinding = Command{
		Use:   "get [NAME]",
		Short: "Get a cluster authz role binding",
		Long:  `Get a cluster authz role binding and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a cluster authz role binding
  %[1]s clusterauthzrolebinding get my-binding`, messages.DefaultCLIName),
	}

	DeleteClusterAuthzRoleBinding = Command{
		Use:   "delete [NAME]",
		Short: "Delete a cluster authz role binding",
		Long:  `Delete a cluster-scoped authorization role binding by name.`,
		Example: fmt.Sprintf(`  # Delete a cluster authz role binding
  %[1]s clusterauthzrolebinding delete my-binding`, messages.DefaultCLIName),
	}

	AuthzRole = Command{
		Use:     "authzrole",
		Aliases: []string{"authzroles", "ar"},
		Short:   "Manage authz roles",
		Long:    `Manage namespace-scoped authorization roles for OpenChoreo.`,
	}

	ListAuthzRole = Command{
		Use:   "list",
		Short: "List authz roles",
		Long:  `List all authz roles in a namespace.`,
		Example: `  # List all authz roles in a namespace
  occ authzrole list --namespace acme-corp`,
	}

	GetAuthzRole = Command{
		Use:   "get [NAME]",
		Short: "Get an authz role",
		Long:  `Get an authz role and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get an authz role
  %[1]s authzrole get my-role --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteAuthzRole = Command{
		Use:   "delete [NAME]",
		Short: "Delete an authz role",
		Long:  `Delete an authorization role by name.`,
		Example: fmt.Sprintf(`  # Delete an authz role
  %[1]s authzrole delete my-role --namespace acme-corp`, messages.DefaultCLIName),
	}

	AuthzRoleBinding = Command{
		Use:     "authzrolebinding",
		Aliases: []string{"authzrolebindings", "arb"},
		Short:   "Manage authz role bindings",
		Long:    `Manage namespace-scoped authorization role bindings for OpenChoreo.`,
	}

	ListAuthzRoleBinding = Command{
		Use:   "list",
		Short: "List authz role bindings",
		Long:  `List all authz role bindings in a namespace.`,
		Example: `  # List all authz role bindings in a namespace
  occ authzrolebinding list --namespace acme-corp`,
	}

	GetAuthzRoleBinding = Command{
		Use:   "get [NAME]",
		Short: "Get an authz role binding",
		Long:  `Get an authz role binding and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get an authz role binding
  %[1]s authzrolebinding get my-binding --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteAuthzRoleBinding = Command{
		Use:   "delete [NAME]",
		Short: "Delete an authz role binding",
		Long:  `Delete an authorization role binding by name.`,
		Example: fmt.Sprintf(`  # Delete an authz role binding
  %[1]s authzrolebinding delete my-binding --namespace acme-corp`, messages.DefaultCLIName),
	}

	WorkflowPlane = Command{
		Use:     "workflowplane",
		Aliases: []string{"wp", "workflowplanes"},
		Short:   "Manage workflow planes",
		Long:    `Manage workflow planes for OpenChoreo.`,
	}

	ObservabilityPlane = Command{
		Use:     "observabilityplane",
		Aliases: []string{"op", "observabilityplanes"},
		Short:   "Manage observability planes",
		Long:    `Manage observability planes for OpenChoreo.`,
	}

	ComponentType = Command{
		Use:     "componenttype",
		Aliases: []string{"ct", "componenttypes"},
		Short:   "Manage component types",
		Long:    `Manage component types for OpenChoreo.`,
	}

	Trait = Command{
		Use:     "trait",
		Aliases: []string{"traits"},
		Short:   "Manage traits",
		Long:    `Manage traits for OpenChoreo.`,
	}

	Workflow = Command{
		Use:     "workflow",
		Aliases: []string{"wf", "workflows"},
		Short:   "Manage workflows",
		Long:    `Manage workflows for OpenChoreo.`,
	}

	SecretReference = Command{
		Use:     "secretreference",
		Aliases: []string{"sr", "secretreferences", "secretref"},
		Short:   "Manage secret references",
		Long:    `Manage secret references for OpenChoreo.`,
	}

	Namespace = Command{
		Use:     "namespace",
		Aliases: []string{"ns", "namespaces"},
		Short:   "Manage namespaces",
		Long:    `Manage namespaces for OpenChoreo.`,
	}

	Project = Command{
		Use:     "project",
		Aliases: []string{"proj", "projects"},
		Short:   "Manage projects",
		Long:    `Manage projects for OpenChoreo.`,
	}

	Component = Command{
		Use:     "component",
		Aliases: []string{"comp", "components"},
		Short:   "Manage components",
		Long:    `Manage components for OpenChoreo.`,
	}

	DeployComponent = Command{
		Use:   "deploy [COMPONENT_NAME]",
		Short: "Deploy or promote a component",
		Long:  "Deploy a component release to the root environment or promote to the next environment in the pipeline.",
		Example: fmt.Sprintf(`  # Deploy latest release to root environment
  %[1]s component deploy api-service --namespace acme-corp --project online-store

  # Deploy specific release
  %[1]s component deploy api-service --release api-service-20260126-143022-1

  # Promote to next environment
  %[1]s component deploy api-service --to staging

  # Deploy with overrides
  %[1]s component deploy api-service --set spec.componentTypeEnvironmentConfigs.replicas=3`, messages.DefaultCLIName),
	}

	StartComponentWorkflow = Command{
		Use:   "run [COMPONENT_NAME]",
		Short: "Run a component's workflow",
		Long:  `Run a workflow for a component using its configured workflow.`,
		Example: `  # Run workflow for a component
  occ component workflow run my-service --namespace acme-corp`,
	}

	LogsComponentWorkflow = Command{
		Use:   "logs [COMPONENT_NAME]",
		Short: "Get logs for a component's workflow run",
		Long: `Get logs for a component's workflow run.
Finds the latest workflow run for the component by default.
Use --workflowrun to specify a particular run.`,
		Example: fmt.Sprintf(`  # Get logs for the latest workflow run of a component
  %[1]s component workflow logs my-service --namespace acme-corp

  # Get logs for a specific workflow run
  %[1]s component workflow logs my-service --namespace acme-corp --workflowrun my-run

  # Follow logs
  %[1]s component workflow logs my-service --namespace acme-corp -f`, messages.DefaultCLIName),
	}

	ListComponentWorkflowRun = Command{
		Use:   "list [COMPONENT_NAME]",
		Short: "List workflow runs for a component",
		Long:  `List all workflow runs associated with a specific component.`,
		Example: `  # List workflow runs for a component
  occ component workflowrun list my-service --namespace acme-corp`,
	}

	LogsComponentWorkflowRun = Command{
		Use:   "logs [COMPONENT_NAME]",
		Short: "Get logs for a component's workflow run",
		Long: `Get logs for a component's workflow run.
Finds the latest workflow run for the component by default.
Use --workflowrun to specify a particular run.`,
		Example: fmt.Sprintf(`  # Get logs for the latest workflow run of a component
  %[1]s component workflowrun logs my-service --namespace acme-corp

  # Get logs for a specific workflow run
  %[1]s component workflowrun logs my-service --namespace acme-corp --workflowrun my-run

  # Follow logs
  %[1]s component workflowrun logs my-service --namespace acme-corp -f`, messages.DefaultCLIName),
	}

	Environment = Command{
		Use:     "environment",
		Aliases: []string{"env", "environments", "envs"},
		Short:   "Manage environments",
		Long:    `Manage environments for OpenChoreo.`,
	}

	DataPlane = Command{
		Use:     "dataplane",
		Aliases: []string{"dp", "dataplanes"},
		Short:   "Manage data planes",
		Long:    `Manage data planes for OpenChoreo.`,
	}

	Workload = Command{
		Use:     "workload",
		Aliases: []string{"wl", "workloads"},
		Short:   "Manage workloads",
		Long:    `Manage workloads for OpenChoreo.`,
	}

	ListWorkload = Command{
		Use:   "list",
		Short: "List workloads",
		Long:  `List all workloads in a namespace.`,
		Example: `  # List all workloads in a namespace
  occ workload list --namespace acme-corp`,
	}

	GetWorkload = Command{
		Use:   "get [WORKLOAD_NAME]",
		Short: "Get a workload",
		Long:  `Get a workload and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a workload
  %[1]s workload get my-workload --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteWorkload = Command{
		Use:   "delete [WORKLOAD_NAME]",
		Short: "Delete a workload",
		Long:  `Delete a workload by name.`,
		Example: fmt.Sprintf(`  # Delete a workload
  %[1]s workload delete my-workload --namespace acme-corp`, messages.DefaultCLIName),
	}

	// ConfigRoot holds usage and help texts for "config" command.
	ConfigRoot = Command{
		Use:   "config",
		Short: "Manage Choreo configuration contexts",
		Long: "Manage configuration contexts that store default values (e.g., namespace, project, component) " +
			"for occ commands.",
		Example: fmt.Sprintf(`  # Add a new configuration context
  %[1]s config context add my-context --controlplane cp1 --credentials cred1

  # List all configuration contexts
  %[1]s config context list

  # Switch to a configuration context
  %[1]s config context use my-context

  # Update a configuration context
  %[1]s config context update my-context --namespace acme-corp --project online-store`, messages.DefaultCLIName),
	}

	// ConfigContext holds usage and help texts for the "config context" parent command.
	ConfigContext = Command{
		Use:   "context",
		Short: "Manage configuration contexts",
		Long:  "Manage configuration contexts that store default values for occ commands.",
	}

	// ConfigContextAdd holds usage and help texts for "config context add" command.
	ConfigContextAdd = Command{
		Use:   "add [CONTEXT_NAME]",
		Short: "Add a new configuration context",
		Long:  "Add a new configuration context with control plane and credentials references.",
		Example: fmt.Sprintf(`  # Add a new context with control plane and credentials
  %[1]s config context add my-context --controlplane cp1 --credentials cred1 --namespace acme-corp`,
			messages.DefaultCLIName),
	}

	// ConfigContextList holds usage and help texts for "config context list" command.
	ConfigContextList = Command{
		Use:   "list",
		Short: "List all configuration contexts",
		Long:  "List all stored configuration contexts, with an asterisk (*) marking the currently active context.",
		Example: fmt.Sprintf(`  # Show all configuration contexts
  %[1]s config context list`, messages.DefaultCLIName),
	}

	// ConfigContextDelete holds usage and help texts for "config context delete" command.
	ConfigContextDelete = Command{
		Use:   "delete [CONTEXT_NAME]",
		Short: "Delete a configuration context",
		Long:  "Delete a configuration context by name.",
		Example: fmt.Sprintf(`  # Delete a configuration context
  %[1]s config context delete my-context`, messages.DefaultCLIName),
	}

	// ConfigContextUpdate holds usage and help texts for "config context update" command.
	ConfigContextUpdate = Command{
		Use:   "update [CONTEXT_NAME]",
		Short: "Update an existing configuration context",
		Long:  "Update fields of an existing configuration context.",
		Example: fmt.Sprintf(`  # Update the namespace and project for a context
  %[1]s config context update my-context --namespace acme-corp --project online-store`,
			messages.DefaultCLIName),
	}

	// ConfigContextUse holds usage and help texts for "config context use" command.
	ConfigContextUse = Command{
		Use:   "use [CONTEXT_NAME]",
		Short: "Switch to a configuration context",
		Long:  "Set the active context, so subsequent commands automatically use its stored values when flags are omitted.",
		Example: fmt.Sprintf(`  # Switch to the configuration context named my-context
  %[1]s config context use my-context`, messages.DefaultCLIName),
	}

	// ConfigControlPlane holds usage and help texts for the "config controlplane" parent command.
	ConfigControlPlane = Command{
		Use:   "controlplane",
		Short: "Manage control plane configurations",
		Long:  "Manage control plane configurations for OpenChoreo API server connections.",
	}

	// ConfigControlPlaneAdd holds usage and help texts for "config controlplane add" command.
	ConfigControlPlaneAdd = Command{
		Use:   "add [CONTROLPLANE_NAME]",
		Short: "Add a new control plane configuration",
		Long:  "Add a new control plane configuration with a URL.",
		Example: fmt.Sprintf(`  # Add a control plane
  %[1]s config controlplane add my-cp --url https://cp.openchoreo.acme.com`, messages.DefaultCLIName),
	}

	// ConfigControlPlaneList holds usage and help texts for "config controlplane list" command.
	ConfigControlPlaneList = Command{
		Use:   "list",
		Short: "List all control plane configurations",
		Long:  "List all stored control plane configurations.",
		Example: fmt.Sprintf(`  # List all control planes
  %[1]s config controlplane list`, messages.DefaultCLIName),
	}

	// ConfigControlPlaneUpdate holds usage and help texts for "config controlplane update" command.
	ConfigControlPlaneUpdate = Command{
		Use:   "update [CONTROLPLANE_NAME]",
		Short: "Update a control plane configuration",
		Long:  "Update the URL of an existing control plane configuration.",
		Example: fmt.Sprintf(`  # Update a control plane URL
  %[1]s config controlplane update my-cp --url https://new-cp.openchoreo.acme.com`, messages.DefaultCLIName),
	}

	// ConfigControlPlaneDelete holds usage and help texts for "config controlplane delete" command.
	ConfigControlPlaneDelete = Command{
		Use:   "delete [CONTROLPLANE_NAME]",
		Short: "Delete a control plane configuration",
		Long:  "Delete a control plane configuration by name.",
		Example: fmt.Sprintf(`  # Delete a control plane
  %[1]s config controlplane delete my-cp`, messages.DefaultCLIName),
	}

	// ConfigCredentials holds usage and help texts for the "config credentials" parent command.
	ConfigCredentials = Command{
		Use:   "credentials",
		Short: "Manage credentials configurations",
		Long:  "Manage credentials configurations for authentication.",
	}

	// ConfigCredentialsAdd holds usage and help texts for "config credentials add" command.
	ConfigCredentialsAdd = Command{
		Use:   "add [CREDENTIALS_NAME]",
		Short: "Add a new credentials configuration",
		Long:  "Add a new credentials configuration entry.",
		Example: fmt.Sprintf(`  # Add credentials
  %[1]s config credentials add my-creds`, messages.DefaultCLIName),
	}

	// ConfigCredentialsList holds usage and help texts for "config credentials list" command.
	ConfigCredentialsList = Command{
		Use:   "list",
		Short: "List all credentials configurations",
		Long:  "List all stored credentials configurations.",
		Example: fmt.Sprintf(`  # List all credentials
  %[1]s config credentials list`, messages.DefaultCLIName),
	}

	// ConfigCredentialsDelete holds usage and help texts for "config credentials delete" command.
	ConfigCredentialsDelete = Command{
		Use:   "delete [CREDENTIALS_NAME]",
		Short: "Delete a credentials configuration",
		Long:  "Delete a credentials configuration by name.",
		Example: fmt.Sprintf(`  # Delete credentials
  %[1]s config credentials delete my-creds`, messages.DefaultCLIName),
	}

	ComponentReleaseRoot = Command{
		Use:     "componentrelease",
		Aliases: []string{"componentreleases", "cr"},
		Short:   "Manage component releases",
		Long:    "Commands for managing component releases in file-system mode",
	}

	ComponentReleaseGenerate = Command{
		Use:   "generate",
		Short: "Generate component releases",
		Long:  "Generate ComponentRelease resources from Component, Workload, ComponentType, and Trait definitions",
		Example: fmt.Sprintf(`  # Generate releases for all components
  %[1]s componentrelease generate --all

  # Generate releases for all components in a specific project
  %[1]s componentrelease generate --project demo-project

  # Generate release for a specific component (requires --project)
  %[1]s componentrelease generate --project demo-project --component greeter-service

  # Dry run (preview without writing)
  %[1]s componentrelease generate --all --dry-run

  # Custom output path
  %[1]s componentrelease generate --all --output-path /custom/path`, messages.DefaultCLIName),
	}

	ReleaseBindingRoot = Command{
		Use:     "releasebinding",
		Aliases: []string{"releasebindings", "rb"},
		Short:   "Manage release bindings",
		Long:    "Commands for managing release bindings in file-system mode",
	}

	ReleaseBindingGenerate = Command{
		Use:   "generate",
		Short: "Generate release bindings for components",
		Long:  "Generate ReleaseBinding resources that bind component releases to environments",
		Example: fmt.Sprintf(`  # Generate bindings for all components in development environment
  %[1]s releasebinding generate --target-env development --use-pipeline default-pipeline --all

  # Generate bindings for all components in a specific project
  %[1]s releasebinding generate --target-env staging --use-pipeline default-pipeline --project demo-project

  # Generate binding for a specific component
  %[1]s releasebinding generate --target-env production --use-pipeline default-pipeline \
    --project demo-project --component greeter-service

  # Generate binding with explicit component release
  %[1]s releasebinding generate --target-env production --use-pipeline default-pipeline \
    --project demo-project --component greeter-service --component-release greeter-service-20251222-3

  # Dry run (preview without writing)
  %[1]s releasebinding generate --target-env development --use-pipeline default-pipeline --all --dry-run

  # Custom output path
  %[1]s releasebinding generate --target-env development --use-pipeline default-pipeline --all \
    --output-path /custom/path`, messages.DefaultCLIName),
	}

	// FlagContextNameDesc is used for the --name flag.
	FlagContextNameDesc = "Name of the configuration context to create, update, or use"

	// FlagNamespaceDesc is used for the --namespace flag.
	FlagNamespaceDesc = "Namespace name stored in this configuration context"

	// FlagProjDesc is used for the --project flag.
	FlagProjDesc = "Project name stored in this configuration context"

	// FlagComponentDesc is used for the --component flag.
	FlagComponentDesc = "Component name stored in this configuration context"

	// FlagBuildDesc is used for the --build flag.
	FlagBuildDesc = "Build identifier stored in this configuration context"

	// FlagEnvDesc is used for the --environment flag.
	FlagEnvDesc = "Environment name stored in this configuration context"

	// FlagDataplaneDesc is used for the --dataplane flag.
	FlagDataplaneDesc = "Data plane reference stored in this configuration context"

	// FlagDeployableArtifactDesc is used for the --deployableartifact flag.
	FlagDeployableArtifactDesc = "Deployable artifact name stored in this configuration context"

	ListComponentRelease = Command{
		Use:   "list",
		Short: "List component releases",
		Long:  `List all component releases for a specific component.`,
		Example: `  # List all component releases for a component
  occ componentrelease list --namespace acme-corp --project online-store --component product-catalog`,
	}

	GetComponentRelease = Command{
		Use:   "get [COMPONENT_RELEASE_NAME]",
		Short: "Get a component release",
		Long:  `Get a component release and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a component release
  %[1]s componentrelease get my-release --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteComponentRelease = Command{
		Use:   "delete [COMPONENT_RELEASE_NAME]",
		Short: "Delete a component release",
		Long:  `Delete a component release by name.`,
		Example: fmt.Sprintf(`  # Delete a component release
  %[1]s componentrelease delete my-release --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListReleaseBinding = Command{
		Use:   "list",
		Short: "List release bindings",
		Long:  `List all release bindings for a specific component.`,
		Example: `  # List all release bindings for a component
  occ releasebinding list --namespace acme-corp --project online-store --component product-catalog`,
	}

	GetReleaseBinding = Command{
		Use:   "get [RELEASE_BINDING_NAME]",
		Short: "Get a release binding",
		Long:  `Get a release binding and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a release binding
  %[1]s releasebinding get my-binding --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteReleaseBinding = Command{
		Use:   "delete [RELEASE_BINDING_NAME]",
		Short: "Delete a release binding",
		Long:  `Delete a release binding by name.`,
		Example: fmt.Sprintf(`  # Delete a release binding
  %[1]s releasebinding delete my-binding --namespace acme-corp`, messages.DefaultCLIName),
	}

	ObservabilityAlertsNotificationChannel = Command{
		Use:     "observabilityalertsnotificationchannel",
		Aliases: []string{"oanc", "obsnotificationchannel", "observabilityalertsnotificationchannels"},
		Short:   "Manage observability alerts notification channels",
		Long:    `Manage observability alerts notification channels for OpenChoreo.`,
	}

	ListObservabilityAlertsNotificationChannel = Command{
		Use:   "list",
		Short: "List observability alerts notification channels",
		Long:  `List all observability alerts notification channels in a namespace.`,
		Example: `  # List all observability alerts notification channels
  occ observabilityalertsnotificationchannel list --namespace acme-corp`,
	}

	GetObservabilityAlertsNotificationChannel = Command{
		Use:   "get [CHANNEL_NAME]",
		Short: "Get an observability alerts notification channel",
		Long:  `Get an observability alerts notification channel and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get an observability alerts notification channel
  %[1]s observabilityalertsnotificationchannel get my-channel --namespace acme-corp`, messages.DefaultCLIName),
	}

	DeleteObservabilityAlertsNotificationChannel = Command{
		Use:   "delete [CHANNEL_NAME]",
		Short: "Delete an observability alerts notification channel",
		Long:  `Delete an observability alerts notification channel by name.`,
		Example: fmt.Sprintf(`  # Delete an observability alerts notification channel
  %[1]s observabilityalertsnotificationchannel delete my-channel --namespace acme-corp`, messages.DefaultCLIName),
	}

	ListWorkflowRun = Command{
		Use:   "list",
		Short: "List workflow runs",
		Long:  `List all workflow runs in a namespace.`,
		Example: `  # List all workflow runs in a namespace
  occ workflowrun list --namespace acme-corp`,
	}

	GetWorkflowRun = Command{
		Use:   "get [WORKFLOW_RUN_NAME]",
		Short: "Get a workflow run",
		Long:  `Get a workflow run and display its details in YAML format.`,
		Example: fmt.Sprintf(`  # Get a workflow run
  %[1]s workflowrun get my-run --namespace acme-corp`, messages.DefaultCLIName),
	}

	LogsWorkflowRun = Command{
		Use:   "logs [WORKFLOW_RUN_NAME]",
		Short: "Get logs for a workflow run",
		Long: `Get logs for a workflow run.
Fetches live logs from the workflow plane for active runs,
or archived logs from the observer for completed runs.`,
		Example: fmt.Sprintf(`  # Get logs for a workflow run
  %[1]s workflowrun logs my-run --namespace acme-corp

  # Follow logs for a running workflow
  %[1]s workflowrun logs my-run --namespace acme-corp -f`, messages.DefaultCLIName),
	}

	WorkflowRun = Command{
		Use:     "workflowrun",
		Aliases: []string{"wr", "workflowruns"},
		Short:   "Manage workflow runs",
		Long:    `Manage workflow runs for OpenChoreo.`,
	}
)

Functions

This section is empty.

Types

type APIVersion

type APIVersion string
const (
	V1       APIVersion = "v1"
	V1Alpha1 APIVersion = "v1alpha1"
)

type CRDConfig

type CRDConfig struct {
	Group   string
	Version APIVersion
	Kind    string
}

type Command

type Command struct {
	Use     string
	Aliases []string
	Short   string
	Long    string
	Example string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL