Targets in Ctrlplane
Overview
A Target in Ctrlplane represents any entity that pipelines can excute against. This includes traditional infrastructure (e.g., EKS clusters) and abstract concepts (e.g., Salesforce accounts).
Key Features
- External Management: Targets exist outside Ctrlplane (e.g., in cloud infrastructure, CI/CD systems).
- Environment Association: Targets are linked to specific Environments, determining workflow triggers.
- Flexible Types: Supports infrastructure-based and custom object Targets.
- Label-based Filtering: Use labels for precise workflow targeting.
Target Lifecycle
-
Creation:
- API-driven: Programmatically create Targets with custom configurations.
- Target Providers: Automated discovery and registration based on predefined criteria.
-
Registration: Link Targets to relevant Environments in Ctrlplane.
-
Workflow Triggering:
- On Target addition to an Environment.
- On Target updates (e.g., configuration changes).
- During new software releases (most common).
-
Custom Deployments: Targets can initiate infrastructure provisioning workflows.
Implementation Examples
EKS Cluster Target
- EKS cluster exists in AWS.
- Target provider discovers and registers it with region/name labels.
- Environment created with matching region filter.
- New release triggers deployment to matching EKS cluster Target.
Salesforce Account Target
- New Salesforce account created.
- Custom workflow provisions Kubernetes resources and infrastructure.
- Target provider registers new infrastructure components.
- Additional workflows configure infrastructure based on Salesforce settings.
Advanced Concepts
- Dynamic Workflows: Customize actions based on Target type and Environment.
- Complex Filtering: Combine labels for granular workflow control.
Target Registration Details
When registered in Ctrlplane, a Target includes:
- Metadata: Kind, version, labels
- Configuration: Schema-defined properties
- Status: Current state (e.g., active, inactive, error)
Registration enables:
- Environment association via labels
- Workflow triggering based on defined conditions
- Visibility in Ctrlplane dashboard for monitoring and management
Environment Assignment
Targets are assigned to Environments using label-based filtering. Example:
- Target label:
environment: staging
- Environment filter:
environment: staging
- Result: Target automatically added to "Staging" Environment