Skip to main content
Version: 0.2

Pipeline Template Use in Application Repos

Understand how pipeline templates integrate with your application repositories to enable automated builds and deployments.

Summary

Pipeline templates provide a one-time application of CI/CD best practices to your repository. Once applied during app registration, your team owns the workflow files and can customize them as needed.

How It Works

The Pipeline Template Concept

  1. Set up environments first - Define your cluster namespace targets (dev, staging, prod)
  2. Register your application - Konstruct applies the pipeline template
  3. Template creates workflow files - Adds publish.yaml and deploy.yaml to your repo
  4. Your team owns the workflows - Full control to modify and customize

What Pipeline Templates Provide

Pipeline templates give you a best practice starting point:

  • Production-ready GitHub Actions workflows
  • Container build and publish automation
  • Helm chart generation and versioning
  • Multi-stage deployment through environments

The Power of Environments

With Konstruct's environments feature, your pipeline can:

  • Deploy dynamically to any set of clusters in an environment
  • Abstract infrastructure - Teams don't worry about underlying clusters
  • Scale deployments - Add/remove clusters without changing pipelines
  • Maintain consistency - Same deployment pattern across all environments

One-Time Application

Important: Pipeline templates are applied once during application registration:

  1. Template files are copied to your repository
  2. Workflows are configured for your environments
  3. Your team has complete ownership
  4. Future template updates don't affect existing apps

This approach ensures:

  • Team autonomy - Modify workflows to fit your needs
  • No surprises - Template changes don't break existing apps
  • Best practices - Start with proven patterns
  • Flexibility - Evolve your CI/CD as requirements change

Example Workflow

When you register an app with environments configured:

# Your app targets these environments (set during registration)
Stage 1: dev-environment → dev namespace → 2 clusters
Stage 2: staging-environment → staging namespace → 1 cluster
Stage 3: prod-environment → prod namespace → 5 clusters

The pipeline template automatically:

  1. Builds and publishes containers on commits to main
  2. Deploys to ALL clusters in dev-environment
  3. Promotes through staging-environment
  4. Advances to ALL clusters in prod-environment

Your team never manages individual clusters - just environments!

Customizing Your Workflows

After template application, teams commonly:

  • Add test stages and quality gates
  • Integrate security scanning tools
  • Customize deployment strategies
  • Add approval workflows
  • Integrate with monitoring systems

The workflows are standard GitHub Actions - customize as needed!

What's Next?