feat: update cronjobs

This commit is contained in:
auricom
2021-07-19 17:32:39 +02:00
parent df76e813b0
commit 0eeca0d34e
7 changed files with 38 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- backup-job
- backup-job.yaml
- helm-release.yaml
- volume.yaml

View File

@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- serviceaccount.yaml

View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: jobs
namespace: media
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: jobs-edit
namespace: media
subjects:
- kind: ServiceAccount
name: jobs
roleRef:
kind: ClusterRole
name: edit
apiGroup: rbac.authorization.k8s.io

View File

@@ -2,5 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
- job.yaml
- upgrade-p2pblocklist-job.yaml
- volumes.yaml

View File

@@ -1,5 +1,5 @@
---
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: qbittorrent-upgrade-p2pblocklist
@@ -10,12 +10,13 @@ spec:
spec:
template:
metadata:
name: upgrade-p2pblocklist
name: qbittorrent-upgrade-p2pblocklist
spec:
serviceAccountName: jobs
containers:
- name: tester
image: bitnami/kubectl:1.21.3
- name: qbittorrent-upgrade-p2pblocklist
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.1.0
imagePullPolicy: IfNotPresent
command:
- "bin/sh"
- "-ec"

View File

@@ -17,8 +17,8 @@ spec:
- name: regcred
containers:
- name: trash-updater
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.0.0
imagePullPolicy: Always
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.1.0
imagePullPolicy: IfNotPresent
env:
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
value: "1"
@@ -37,6 +37,8 @@ spec:
chmod 755 trash
./trash radarr --config /opt/trash.yaml
curl -m 10 --retry 5 https://healthchecks.k3s.xpander.ovh/ping/4776417a-8410-4c33-91ca-20e4284254f0
volumeMounts:
- name: config
mountPath: /opt/trash.yaml

View File

@@ -1,5 +1,5 @@
---
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: sonarr-trash-updater
@@ -17,7 +17,8 @@ spec:
- name: regcred
containers:
- name: trash-updater
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.0.0
image: registry.${SECRET_CLUSTER_DOMAIN}/homelab/home-cluster-jobs:1.1.0
imagePullPolicy: IfNotPresent
env:
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
value: "1"
@@ -36,6 +37,8 @@ spec:
chmod 755 trash
./trash sonarr --config /opt/trash.yaml
curl -m 10 --retry 5 https://healthchecks.k3s.xpander.ovh/ping/f4c120e6-e12d-44b2-9ff9-e5433c0b7df4
volumeMounts:
- name: config
mountPath: /opt/trash.yaml