Automation and CI/CD Integration
Automation and CI/CD Integration
Integration patterns for using AICR in automated pipelines.
Overview
Typical integration workflows:
- Snapshot capture: Deploy agent Job to capture cluster configuration
- Recipe generation: Generate configuration recommendations from snapshot or query parameters
- Bundle creation: Create deployment artifacts (Helm values, manifests, scripts)
- Deployment: Apply generated configuration to cluster
- Validation: Verify deployment using test workloads
Supported CI/CD platforms: GitHub Actions, GitLab CI, Jenkins, Argo Workflows, Tekton
Integration Patterns
Pattern 1: Configuration Snapshot + Drift Detection
Periodically capture snapshots and compare against baseline.
Use case: Detect unauthorized configuration changes
Pattern 2: Canonical Snapshot to Bundle Pipeline
Generate optimized configuration and deploy operators. The pipeline below is
the canonical reference: every stage uses the same aicr CLI invocations, so
it translates directly to any CI system (see Translating to other CI
systems below).
Use case: Deploy GPU Operator with environment-specific settings
Translating to other CI systems
The four stages above map one-to-one onto other platforms. Only the job/stage
syntax and artifact passing differ — the aicr commands are identical.
Use a container image with the CLI preinstalled (ghcr.io/nvidia/aicr:latest)
for the recipe/bundle stages, and a kubectl-capable image for snapshot/deploy.
Pattern 3: GitOps Deployment with Argo CD
Use Argo CD for declarative, GitOps-based deployments with automatic sync-wave ordering.
Use case: Automated deployment pipeline with Argo CD
Generated Argo CD Application with multi-source:
Pattern 4: Multi-Environment GitOps
Deploy to multiple environments with environment-specific deployers.
Monitoring and Alerting
Prometheus Metrics
Scrape AICR API Server:
Key metrics:
Alerting Rules
Best Practices
1. Caching Recipes
API responses are cacheable (Cache-Control: max-age=300):
2. Error Handling and Retries
3. Parallel Recipe Generation
4. Structured Logging
5. Snapshot Versioning
Security Considerations
Note: The API server does not yet provide built-in authentication (API keys or Bearer tokens). Front it with an ingress, service mesh, or API gateway that enforces authn/authz, and restrict reachability with the network policy below.
Network Policies
Restrict AICR agent network access:
Troubleshooting
Debug API Calls
Validate Snapshots
Test Recipe Generation
See Also
- API Reference - API endpoint documentation
- Data Flow - Understanding data architecture
- Kubernetes Deployment - Self-hosted API server
- CLI Reference - CLI commands
- Agent Deployment - Kubernetes agent