73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: jellyfin-plugins-for-12-2
|
|
namespace: jellyfin
|
|
labels:
|
|
app.kubernetes.io/name: jellyfin
|
|
app.kubernetes.io/component: plugin-upgrade
|
|
spec:
|
|
backoffLimit: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: jellyfin
|
|
app.kubernetes.io/component: plugin-upgrade
|
|
spec:
|
|
restartPolicy: Never
|
|
automountServiceAccountToken: false
|
|
nodeSelector:
|
|
kubernetes.io/hostname: arschrock
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
effect: NoSchedule
|
|
securityContext:
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
containers:
|
|
- name: upgrade
|
|
image: docker.io/library/alpine:3.24.2
|
|
imagePullPolicy: IfNotPresent
|
|
command:
|
|
- /bin/sh
|
|
- -ec
|
|
- |
|
|
plugins=/state/data/plugins
|
|
saved=/state/plugin-backups/pre-12.2
|
|
mkdir -p "${saved}"
|
|
for old in "${plugins}"/LDAP\ Authentication_* "${plugins}"/Jellyfin\ Ignore_*; do
|
|
[ -e "${old}" ] || continue
|
|
name=${old##*/}
|
|
[ -e "${saved}/${name}" ] || mv "${old}" "${saved}/${name}"
|
|
done
|
|
mkdir -p "${plugins}/LDAP Authentication_24.0.0.0"
|
|
wget -qO /tmp/ldap.zip https://github.com/jellyfin/jellyfin-plugin-ldapauth/releases/download/v24/ldap-authentication_24.0.0.0.zip
|
|
unzip -q /tmp/ldap.zip -d "${plugins}/LDAP Authentication_24.0.0.0"
|
|
mkdir -p "${plugins}/Jellyfin Ignore_0.6.3.0"
|
|
wget -qO /tmp/ignore.zip https://github.com/fdett/jellyfin-ignore/releases/download/v0.6.3/jellyfin-ignore_0.6.3.0.zip
|
|
unzip -q /tmp/ignore.zip -d "${plugins}/Jellyfin Ignore_0.6.3.0"
|
|
grep -q '"targetAbi": "12.0.0.0"' "${plugins}/LDAP Authentication_24.0.0.0/meta.json"
|
|
grep -q '"targetAbi": "12.0.0.0"' "${plugins}/Jellyfin Ignore_0.6.3.0/meta.json"
|
|
find "${saved}" -maxdepth 1 -mindepth 1 -type d -print
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
readOnlyRootFilesystem: true
|
|
runAsNonRoot: true
|
|
runAsUser: 930
|
|
runAsGroup: 930
|
|
volumeMounts:
|
|
- name: state
|
|
mountPath: /state
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
volumes:
|
|
- name: state
|
|
persistentVolumeClaim:
|
|
claimName: jellyfin-config
|
|
- name: tmp
|
|
emptyDir: {}
|