ai-code-battle/deploy/k8s/ci/workflow-template-build-image.yaml
jedarden e88749b134 Add Traefik ingress, TLS certificate, and Argo CI/CD pipeline manifests
- Traefik IngressRoute for api.aicodebattle.com with CORS, security
  headers, and rate limiting (100 req/min)
- cert-manager Certificate (Let's Encrypt prod, ECDSA P-256)
- Argo Events webhook EventSource + Sensor (triggers on master push)
- Argo Workflows: parallel Kaniko builds for all 10 container images
  plus web SPA site build, with layer caching
- CI ServiceAccount + RBAC for workflow execution
- Registry credentials SealedSecret template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 01:26:01 -04:00

49 lines
1.5 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: acb-build-image
namespace: ai-code-battle
labels:
app.kubernetes.io/name: acb-build-image
app.kubernetes.io/part-of: ai-code-battle
app.kubernetes.io/component: ci
spec:
templates:
- name: kaniko-build
inputs:
parameters:
- name: context
- name: dockerfile
- name: image
artifacts:
- name: source
git:
repo: https://forgejo.ardenone.com/ai-code-battle/ai-code-battle.git
revision: "{{workflow.parameters.commit-sha}}"
container:
image: gcr.io/kaniko-project/executor:v1.23.2
args:
- --context=/workspace/source/{{inputs.parameters.context}}
- --dockerfile=/workspace/source/{{inputs.parameters.dockerfile}}
- --destination={{inputs.parameters.image}}
- --cache=true
- --cache-repo=forgejo.ardenone.com/ai-code-battle/cache
- --snapshot-mode=redo
- --use-new-run
volumeMounts:
- name: registry-credentials
mountPath: /kaniko/.docker
readOnly: true
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
memory: 2Gi
volumes:
- name: registry-credentials
secret:
secretName: acb-registry-credentials
items:
- key: .dockerconfigjson
path: config.json