Files
feedc0de 9d0e7f5c95
Validate and deploy asciinema / Validate manifests (push) Successful in 13s
Validate and deploy asciinema / Deploy to Kubernetes (push) Successful in 36s
First try in deploying asciinema to kubernetes
2026-09-11 09:10:24 +02:00

62 lines
1.8 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: asciinema-bootstrap
namespace: asciinema
labels:
app.kubernetes.io/name: asciinema
app.kubernetes.io/component: bootstrap
spec:
backoffLimit: 5
ttlSecondsAfterFinished: 600
template:
metadata:
labels:
app.kubernetes.io/name: asciinema
app.kubernetes.io/component: bootstrap
spec:
restartPolicy: OnFailure
automountServiceAccountToken: false
containers:
- name: bucket
image: amazon/aws-cli:2.28.22
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -ec
- >-
aws --endpoint-url "$S3_ENDPOINT" s3api head-bucket --bucket asciinema >/dev/null 2>&1 ||
aws --endpoint-url "$S3_ENDPOINT" s3api create-bucket --bucket asciinema >/dev/null
env:
- name: S3_ENDPOINT
value: http://rook-ceph-rgw-my-store.rook-ceph.svc.cluster.local
- name: AWS_DEFAULT_REGION
value: keller
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: asciinema-secrets
key: s3-access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: asciinema-secrets
key: s3-secret-access-key
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 250m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
seccompProfile:
type: RuntimeDefault