This commit is contained in:
11
deploy/act-runners/kb/README.md
Normal file
11
deploy/act-runners/kb/README.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
**Deploy app:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./deploy/ops-scripts/apply-app.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
**Deploy Infra:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./deploy/ops-scripts/apply-infra.sh
|
||||||
|
```
|
||||||
2
deploy/act-runners/kb/deploy/app/.env.d/.gitignore
vendored
Normal file
2
deploy/act-runners/kb/deploy/app/.env.d/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
**
|
||||||
|
!.gitignore
|
||||||
27
deploy/act-runners/kb/deploy/app/configmap.yaml
Normal file
27
deploy/act-runners/kb/deploy/app/configmap.yaml
Normal 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"
|
||||||
66
deploy/act-runners/kb/deploy/app/deployment.yaml
Normal file
66
deploy/act-runners/kb/deploy/app/deployment.yaml
Normal 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
|
||||||
14
deploy/act-runners/kb/deploy/app/kustomization.yaml
Normal file
14
deploy/act-runners/kb/deploy/app/kustomization.yaml
Normal 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
|
||||||
|
|
||||||
4
deploy/act-runners/kb/deploy/ops-scripts/apply-app.sh
Executable file
4
deploy/act-runners/kb/deploy/ops-scripts/apply-app.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
NAMESPACE=kb-cicd
|
||||||
|
kubectl kustomize deploy/app | kubectl --namespace ${NAMESPACE} apply -f -
|
||||||
4
deploy/act-runners/kb/deploy/ops-scripts/apply-infra.sh
Executable file
4
deploy/act-runners/kb/deploy/ops-scripts/apply-infra.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
NAMESPACE=kb-cicd
|
||||||
|
kubectl create namespace ${NAMESPACE} || true
|
||||||
Reference in New Issue
Block a user