# Default values for tekton-cicd Helm chart
# This file contains configurable values for the CI/CD pipeline

# Global settings
global:
  # Registry configuration
  # NOTE: Use external HTTPS URL - containerd requires HTTPS for authenticated registries
  registry:
    url: "registry.bakewise.ai/bakery-admin"
  
  # Git configuration
  git:
    branch: "main"
    userName: "bakery-ia-ci"
    userEmail: "ci@bakery-ia.local"

# Pipeline configuration
pipeline:
  # Build configuration
  build:
    cacheTTL: "24h"
    verbosity: "info"
    # Base image registry configuration
    # NOTE: Use external HTTPS URL - containerd requires HTTPS for authenticated registries
    baseRegistry: "registry.bakewise.ai/bakery-admin"
    pythonImage: "python:3.11-slim"
  
  # Test configuration
  test:
    skipTests: "false"
    skipLint: "false"
  
  # Deployment configuration
  deployment:
    namespace: "bakery-ia"
    fluxNamespace: "flux-system"
  
  # Workspace configuration
  workspace:
    size: "5Gi"
    storageClass: "standard"

# Tekton controller settings
controller:
  replicas: 1
  resources:
    limits:
      cpu: 1000m
      memory: 1Gi
    requests:
      cpu: 100m
      memory: 128Mi

# Tekton webhook settings
webhook:
  replicas: 1
  resources:
    limits:
      cpu: 500m
      memory: 512Mi
    requests:
      cpu: 50m
      memory: 64Mi

# Namespace for Tekton resources
# Set to empty/false to skip namespace creation (namespace is created by Tekton installation)
namespace: ""

# Secrets configuration
secrets:
  # Webhook secret for validating incoming webhooks
  webhook:
    token: "secure-webhook-token-replace-with-actual-value"
  
  # Registry credentials for pushing images
  # Uses the same credentials as Gitea admin for consistency
  # NOTE: Use external HTTPS URL - containerd requires HTTPS for authenticated registries
  registry:
    username: "bakery-admin"
    password: ""  # Will be populated from gitea-admin-secret
    registryUrl: "registry.bakewise.ai"
  
  # Git credentials for GitOps updates
  # Uses the same credentials as Gitea admin for consistency
  git:
    username: "bakery-admin"
    password: ""  # Will be populated from gitea-admin-secret

# Service accounts
serviceAccounts:
  triggers:
    name: "tekton-triggers-sa"
  pipeline:
    name: "tekton-pipeline-sa"

# Cleanup and retention configuration
cleanup:
  # PipelineRun retention (requires Tekton Pipelines >= v0.52.0)
  # Set to 0 to disable automatic cleanup
  pipelineRuns:
    # Keep last N successful PipelineRuns per Pipeline
    keepSuccessful: 3
    # Keep last N failed PipelineRuns per Pipeline
    keepFailed: 5
  # TaskRun retention
  taskRuns:
    keepSuccessful: 3
    keepFailed: 5

# Labels to apply to resources
labels:
  app:
    name: "bakery-ia-cicd"
    component: "tekton"