Added tmp job for unban me in gitea
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 37s
Check with kubeconform / lint (push) Failing after 12s
Auto-update README / Generate README and Create MR (push) Successful in 15s

This commit is contained in:
2026-06-28 11:50:56 +03:00
parent 78c1519398
commit 3d58baaf2f
2 changed files with 61 additions and 1 deletions
+1 -1
View File
@@ -5,6 +5,6 @@ resources:
- app.yaml
- external-secrets.yaml
- deployment.yaml
- user-unban-cronjob.yaml
- service.yaml
- ingress.yaml
+60
View File
@@ -0,0 +1,60 @@
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: gitea-user-unban
labels:
app: gitea-user-unban
spec:
schedule: "*/10 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 3
jobTemplate:
spec:
template:
metadata:
labels:
app: gitea-user-unban
spec:
restartPolicy: OnFailure
nodeSelector:
kubernetes.io/hostname: master.tail2fe2d.ts.net
volumes:
- name: storage
hostPath:
path: /k8s/gitea
type: Directory
containers:
- name: sqlite-unban
image: 'gitea/gitea:latest'
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "32Mi"
cpu: "10m"
limits:
memory: "128Mi"
cpu: "100m"
command:
- /bin/sh
- -ec
- |
sqlite3 -cmd ".timeout 30000" /data/gitea/gitea.db "
UPDATE \"user\"
SET is_active = 1,
prohibit_login = 0,
updated_unix = unixepoch()
WHERE lower(email) = lower('ab@hexor.cy')
AND (is_active <> 1 OR prohibit_login <> 0);
SELECT printf(
'gitea user watchdog: id=%d login=%s email=%s is_active=%d prohibit_login=%d updated_unix=%d',
id, lower_name, email, is_active, prohibit_login, updated_unix
)
FROM \"user\"
WHERE lower(email) = lower('ab@hexor.cy');
"
volumeMounts:
- name: storage
mountPath: /data