88 lines
2.9 KiB
YAML
88 lines
2.9 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: fdroidserver-publish
|
|
spec:
|
|
schedule: "*/5 * * * *"
|
|
concurrencyPolicy: Forbid
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 3
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 1
|
|
activeDeadlineSeconds: 1800
|
|
template:
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
restartPolicy: Never
|
|
nodeSelector:
|
|
kubernetes.io/hostname: master
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: publish
|
|
image: registry.gitlab.com/fdroid/docker-executable-fdroidserver@sha256:70c3761a76bd30c63911ff1af4f3857573ac43891e6ecf72eac76b19c931e4c0
|
|
command: [python3, /config/sync_releases.py]
|
|
workingDir: /data
|
|
env:
|
|
- name: HOME
|
|
value: /tmp
|
|
- name: ANDROID_HOME
|
|
value: /opt/android-sdk
|
|
- name: PATH
|
|
value: /home/vagrant/fdroidserver:/usr/local/bin:/usr/bin:/bin:/opt/android-sdk/build-tools/32.0.0
|
|
# fdroid update records its upstream Git revision in its status output.
|
|
- name: GIT_CONFIG_COUNT
|
|
value: "1"
|
|
- name: GIT_CONFIG_KEY_0
|
|
value: safe.directory
|
|
- name: GIT_CONFIG_VALUE_0
|
|
value: /home/vagrant/fdroidserver
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: [ALL]
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
- name: config
|
|
mountPath: /config
|
|
readOnly: true
|
|
- name: metadata
|
|
mountPath: /config/metadata
|
|
readOnly: true
|
|
- name: signing
|
|
mountPath: /secrets
|
|
readOnly: true
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
volumes:
|
|
- name: data
|
|
hostPath:
|
|
path: /data/k8s/fdroidserver
|
|
type: Directory
|
|
- name: config
|
|
configMap:
|
|
name: fdroidserver-config
|
|
- name: metadata
|
|
configMap:
|
|
name: fdroidserver-metadata
|
|
- name: signing
|
|
secret:
|
|
secretName: fdroidserver-signing
|
|
defaultMode: 0440
|
|
- name: tmp
|
|
emptyDir: {}
|