titan-iac/services/gitea/atlas-identity-bootstrap-job.yaml
jenkins 53a090d3f5
Some checks failed
Tests / Declarative: Post Actions failed: 2, passed: 266
gitea: add Atlas contributor identities
2026-08-13 19:33:33 -03:00

87 lines
2.5 KiB
YAML

# services/gitea/atlas-identity-bootstrap-job.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: gitea-atlas-identity-bootstrap-1
namespace: gitea
labels:
app.kubernetes.io/name: gitea
app.kubernetes.io/component: identity-bootstrap
spec:
backoffLimit: 4
template:
metadata:
labels:
app.kubernetes.io/name: gitea
app.kubernetes.io/component: identity-bootstrap
spec:
restartPolicy: Never
serviceAccountName: gitea-vault
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
seccompProfile:
type: RuntimeDefault
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: gitea
topologyKey: kubernetes.io/hostname
nodeSelector:
node-role.kubernetes.io/worker: "true"
hardware: rpi5
containers:
- name: bootstrap
image: gitea/gitea:1.23
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- /opt/bootstrap/gitea_atlas_identity_ensure.sh
env:
- name: HOME
value: /data/git
- name: USER
value: git
- name: GITEA_WORK_DIR
value: /data/gitea
- name: GITEA_APP_INI
value: /data/gitea/conf/app.ini
- name: GITEA_API_URL
value: http://gitea.gitea.svc.cluster.local:3000/api/v1
- name: GITEA_PUBLIC_URL
value: https://scm.bstein.dev
- name: VAULT_ADDR
value: http://vault.vault.svc.cluster.local:8200
- name: VAULT_ROLE
value: gitea
resources:
requests:
cpu: 25m
memory: 64Mi
limits:
cpu: 250m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
volumeMounts:
- name: data
mountPath: /data
- name: bootstrap
mountPath: /opt/bootstrap
readOnly: true
volumes:
- name: data
persistentVolumeClaim:
claimName: gitea-data
- name: bootstrap
configMap:
name: gitea-atlas-identity-bootstrap
defaultMode: 0555