Add Kaniko build automation for resume-site
- Namespace for resume-site resources - Build trigger CronJob (runs every 5 minutes) - Kaniko-based image builds to Harbor - RBAC for build job creation - PVC for tracking last commit Follows same pattern as neon-vortex 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
39
k8s/build-trigger-cronjob.yaml
Normal file
39
k8s/build-trigger-cronjob.yaml
Normal file
@@ -0,0 +1,39 @@
|
||||
apiVersion: batch/v1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: resume-site-build-trigger
|
||||
namespace: resume-site
|
||||
spec:
|
||||
schedule: "*/5 * * * *"
|
||||
concurrencyPolicy: Forbid
|
||||
successfulJobsHistoryLimit: 1
|
||||
failedJobsHistoryLimit: 1
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
serviceAccountName: build-trigger-cron-sa
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: trigger
|
||||
image: alpine/k8s:1.28.13
|
||||
command:
|
||||
- /bin/bash
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
apk add --no-cache git bash curl
|
||||
/scripts/trigger-build.sh
|
||||
volumeMounts:
|
||||
- name: script
|
||||
mountPath: /scripts
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: script
|
||||
configMap:
|
||||
name: build-trigger-script
|
||||
defaultMode: 0755
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: build-trigger-data
|
||||
Reference in New Issue
Block a user