107 lines
2.9 KiB
YAML
107 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: garm
|
|
namespace: garm
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: garm
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: garm
|
|
spec:
|
|
serviceAccountName: garm
|
|
initContainers:
|
|
- name: render-garm-config
|
|
image: alpine:3.21
|
|
env:
|
|
- name: JWT_AUTH_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: garm-config
|
|
key: jwt_auth_secret
|
|
- name: DATABASE_PASSPHRASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: garm-config
|
|
key: database_passphrase
|
|
command:
|
|
- /bin/sh
|
|
- -ec
|
|
- |
|
|
cat <<EOF > /etc/garm/config.toml
|
|
[default]
|
|
enable_webhook_management = true
|
|
|
|
[logging]
|
|
enable_log_streamer = true
|
|
log_format = "text"
|
|
log_level = "info"
|
|
log_source = false
|
|
|
|
[metrics]
|
|
enable = true
|
|
disable_auth = false
|
|
|
|
[jwt_auth]
|
|
secret = "${JWT_AUTH_SECRET}"
|
|
time_to_live = "8760h"
|
|
|
|
[apiserver]
|
|
bind = "0.0.0.0"
|
|
port = 9997
|
|
use_tls = false
|
|
[apiserver.webui]
|
|
enable = true
|
|
|
|
[database]
|
|
backend = "sqlite3"
|
|
passphrase = "${DATABASE_PASSPHRASE}"
|
|
[database.sqlite3]
|
|
db_file = "/data/garm.db"
|
|
busy_timeout_seconds = 5
|
|
|
|
[[provider]]
|
|
name = "kubernetes_external"
|
|
description = "Kubernetes provider"
|
|
provider_type = "external"
|
|
[provider.external]
|
|
config_file = "/etc/garm/provider-config.yaml"
|
|
provider_executable = "/opt/garm/providers.d/garm-provider-k8s"
|
|
environment_variables = ["KUBERNETES_"]
|
|
EOF
|
|
volumeMounts:
|
|
- name: config-dir
|
|
mountPath: /etc/garm
|
|
containers:
|
|
- name: garm
|
|
image: gitea.lumpiasty.xyz/lumpiasty/garm-k8s:r1380
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- /bin/garm
|
|
- --config
|
|
- /etc/garm/config.toml
|
|
ports:
|
|
- name: http
|
|
containerPort: 9997
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
- name: config-dir
|
|
mountPath: /etc/garm
|
|
- name: provider-config
|
|
mountPath: /etc/garm/provider-config.yaml
|
|
subPath: provider-config.yaml
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: garm-lvmhdd
|
|
- name: config-dir
|
|
emptyDir: {}
|
|
- name: provider-config
|
|
configMap:
|
|
name: garm-provider-k8s-config
|