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 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- backup-job - backup-job.yaml
- helm-release.yaml - helm-release.yaml
- volume.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 kind: Kustomization
resources: resources:
- helm-release.yaml - helm-release.yaml
- job.yaml - upgrade-p2pblocklist-job.yaml
- volumes.yaml - volumes.yaml

View File

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

View File

@@ -17,8 +17,8 @@ spec:
- name: regcred - name: regcred
containers: containers:
- name: trash-updater - 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: Always imagePullPolicy: IfNotPresent
env: env:
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT - name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
value: "1" value: "1"
@@ -37,6 +37,8 @@ spec:
chmod 755 trash chmod 755 trash
./trash radarr --config /opt/trash.yaml ./trash radarr --config /opt/trash.yaml
curl -m 10 --retry 5 https://healthchecks.k3s.xpander.ovh/ping/4776417a-8410-4c33-91ca-20e4284254f0
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /opt/trash.yaml mountPath: /opt/trash.yaml

View File

@@ -1,5 +1,5 @@
--- ---
apiVersion: batch/v1beta1 apiVersion: batch/v1
kind: CronJob kind: CronJob
metadata: metadata:
name: sonarr-trash-updater name: sonarr-trash-updater
@@ -17,7 +17,8 @@ spec:
- name: regcred - name: regcred
containers: containers:
- name: trash-updater - 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: env:
- name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT - name: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
value: "1" value: "1"
@@ -36,6 +37,8 @@ spec:
chmod 755 trash chmod 755 trash
./trash sonarr --config /opt/trash.yaml ./trash sonarr --config /opt/trash.yaml
curl -m 10 --retry 5 https://healthchecks.k3s.xpander.ovh/ping/f4c120e6-e12d-44b2-9ff9-e5433c0b7df4
volumeMounts: volumeMounts:
- name: config - name: config
mountPath: /opt/trash.yaml mountPath: /opt/trash.yaml