Skip to main content

Component

The Component CRD allows you to define and organize components in your infrastructure, enabling you to model, visualize, and track various elements of your system.

Definition

apiVersion: canaries.flanksource.com/v1
kind: Component
metadata:
name: example-component
spec:
# Human readable name of the component
name: Example Service

# Optional type classification
type: service

# Description of the component
description: An example component for demonstration purposes

# Owner of the component
owner: platform-team

# Icon to represent the component
icon: https://example.com/icons/service.svg

# Labels for categorization
labels:
environment: production
tier: frontend

Schema

The Component resource supports the following fields:

FieldDescription
spec.nameHuman-readable name of the component
spec.displayNameAlternative display name for the component
spec.descriptionDescription of the component's purpose
spec.typeType classification (e.g., service, database, app)
spec.subtypeSub-classification of the component type
spec.iconIcon URL or name to visually represent the component
spec.ownerOwner of the component (team/person)
spec.labelsKey-value pairs for categorizing the component
spec.configComponent-specific configuration
spec.itemsChild items or sub-components
spec.propertiesAdditional properties as key-value pairs
spec.checksHealth checks to perform for this component
spec.dashboardsAssociated dashboards for monitoring
spec.costsCost tracking configuration
spec.ticketTicketing system integration
spec.sloService Level Objectives
spec.statusMessageCustom status message
spec.statusReasonReason for the current status

Status

The Component controller updates the resource with status information, including:

Status FieldDescription
status.healthOverall health status of the component
status.costPerMonthMonthly cost of the component
status.artifactsAssociated artifacts
status.dependenciesComponent dependencies
status.incidentsActive incidents related to the component
status.lastScrapeTimestamp of the last data scrape
status.lastSeenTimestamp when the component was last seen

Examples

Basic Component

apiVersion: canaries.flanksource.com/v1
kind: Component
metadata:
name: frontend-web
spec:
name: Frontend Web Application
type: web-application
description: Customer-facing web application for product browsing and purchasing
owner: web-team
labels:
tier: frontend
environment: production
criticality: high

Component with Checks

apiVersion: canaries.flanksource.com/v1
kind: Component
metadata:
name: payment-service
spec:
name: Payment Processing Service
type: microservice
description: Handles all payment processing operations
owner: payments-team
checks:
http:
- name: api-health
url: https://payments.example.com/health
interval: 1m
thresholdMillis: 300
tcp:
- name: db-connection
host: payments-db.example.com
port: 5432
interval: 5m

Hierarchical Component

apiVersion: canaries.flanksource.com/v1
kind: Component
metadata:
name: e-commerce-platform
spec:
name: E-Commerce Platform
type: platform
description: Complete e-commerce solution
owner: platform-team
items:
- name: Web Frontend
type: web-application
owner: web-team
- name: Authentication Service
type: microservice
owner: auth-team
- name: Payment Processing
type: microservice
owner: payments-team
- name: Order Management
type: microservice
owner: orders-team

See Also