add kb act runner
Some checks are pending
/ continuous-deploy (push) Waiting to run

This commit is contained in:
2026-03-15 00:38:47 +00:00
parent 6cbd805492
commit a8025799d1
7 changed files with 128 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
**Deploy app:**
```bash
./deploy/ops-scripts/apply-app.sh
```
**Deploy Infra:**
```bash
./deploy/ops-scripts/apply-infra.sh
```

View File

@@ -0,0 +1,2 @@
**
!.gitignore

View File

@@ -0,0 +1,27 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: kb-act-runner
data:
config.yaml: |
log:
level: info
runner:
capacity: 4
labels:
- "oci-image-builder"
container:
engine: kubernetes
kubernetes:
namespace: kb-cicd
pull_policy: IfNotPresent
privileged: false
workdir_parent: "/workspace"
cache:
enabled: false
host:
workdir: "/data/runner"

View File

@@ -0,0 +1,66 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kb-act-runner
labels:
app: kb-act-runner
spec:
replicas: 1
selector:
matchLabels:
app: kb-act-runner
template:
metadata:
labels:
app: kb-act-runner
spec:
containers:
- name: kb-act-runner
image: git.limbosolutions.com/kb/gitea/act_runner:0.3-fatboy
imagePullPolicy: Always
env:
- name: LOG_LEVEL
value: "trace"
- name: CONFIG_FILE
value: /etc/act_runner/config.yaml
- name: GITEA_INSTANCE_URL
valueFrom:
secretKeyRef:
name: kb-act-runner
key: GITEA_INSTANCE_URL
- name: GITEA_RUNNER_REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
name: kb-act-runner
key: GITEA_RUNNER_REGISTRATION_TOKEN
- name: GITEA_RUNNER_NAME
valueFrom:
secretKeyRef:
name: kb-act-runner
key: GITEA_RUNNER_NAME
- name: GITEA_RUNNER_EPHEMERAL
value: "0"
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "400m"
volumeMounts:
- name: config-map
mountPath: /etc/act_runner/config.yaml
subPath: config.yaml
- name: runner-data
mountPath: /data/runner
volumes:
- name: config-map
configMap:
name: kb-act-runner
- name: runner-data
emptyDir: {} # or PVC if you want persistence across pod restarts

View File

@@ -0,0 +1,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- configmap.yaml
- deployment.yaml
generatorOptions:
disableNameSuffixHash: true
secretGenerator:
- name: kb-act-runner
envs:
- .env.d/.env

View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -e
NAMESPACE=kb-cicd
kubectl kustomize deploy/app | kubectl --namespace ${NAMESPACE} apply -f -

View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -e
NAMESPACE=kb-cicd
kubectl create namespace ${NAMESPACE} || true