Rollout restart PVR namespace;Upgrade Argus
This commit is contained in:
parent
bc69854946
commit
8355a6fa44
@ -18,7 +18,7 @@ spec:
|
|||||||
serviceAccountName: argus
|
serviceAccountName: argus
|
||||||
containers:
|
containers:
|
||||||
- name: argus
|
- name: argus
|
||||||
image: releaseargus/argus:0.13.3
|
image: releaseargus/argus:0.15.2
|
||||||
args:
|
args:
|
||||||
- -config.file=/app/config/config.yml
|
- -config.file=/app/config/config.yml
|
||||||
ports:
|
ports:
|
||||||
|
57
services/PVR/Plex/cronjob-RolloutRestart.yml
Normal file
57
services/PVR/Plex/cronjob-RolloutRestart.yml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: kubectl-rolloutrestart
|
||||||
|
namespace: pvr
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: kubectl-rolloutrestart
|
||||||
|
namespace: pvr
|
||||||
|
rules:
|
||||||
|
- apiGroups: ["apps", "extensions"]
|
||||||
|
resources: ["deployments", "statefulsets"]
|
||||||
|
verbs: ["get", "list", "patch"]
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: kubectl-rolloutrestart-pvr
|
||||||
|
namespace: pvr
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: kubectl-rolloutrestart
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: kubectl-rolloutrestart
|
||||||
|
namespace: pvr
|
||||||
|
---
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: kubectl-rolloutrestart
|
||||||
|
namespace: pvr
|
||||||
|
spec:
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
failedJobsHistoryLimit: 1
|
||||||
|
successfulJobsHistoryLimit: 1
|
||||||
|
schedule: '30 2 * * *'
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
backoffLimit: 2
|
||||||
|
activeDeadlineSeconds: 600
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
serviceAccountName: kubectl-rolloutrestart
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: kubectl
|
||||||
|
image: bitnami/kubectl
|
||||||
|
command:
|
||||||
|
- '/bin/bash'
|
||||||
|
- '-c'
|
||||||
|
args:
|
||||||
|
- for workload in `kubectl get deployments -n pvr --no-headers | cut -d " " -f 1`; do kubectl rollout restart deployment -n pvr $workload; done;
|
||||||
|
for workload in `kubectl get statefulsets -n pvr | cut -d " " -f 1`; do kubectl rollout restart statefulsets -n pvr $workload; done;
|
@ -1,87 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: ClusterRole
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
rules:
|
|
||||||
- apiGroups: ["apps", "extensions"]
|
|
||||||
resources: ["deployments"]
|
|
||||||
# verbs: ["get", "patch", "list", "watch"]
|
|
||||||
verbs: ["get", "list", "patch"]
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart-default
|
|
||||||
namespace: default
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart-unifi
|
|
||||||
namespace: unifi
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
---
|
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
|
||||||
kind: RoleBinding
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart-pvr
|
|
||||||
namespace: pvr
|
|
||||||
roleRef:
|
|
||||||
apiGroup: rbac.authorization.k8s.io
|
|
||||||
kind: ClusterRole
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
subjects:
|
|
||||||
- kind: ServiceAccount
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
---
|
|
||||||
apiVersion: batch/v1beta1
|
|
||||||
kind: CronJob
|
|
||||||
metadata:
|
|
||||||
name: kubectl-rolloutrestart
|
|
||||||
namespace: default
|
|
||||||
spec:
|
|
||||||
concurrencyPolicy: Forbid
|
|
||||||
failedJobsHistoryLimit: 1
|
|
||||||
successfulJobsHistoryLimit: 1
|
|
||||||
schedule: '30 2 * * *'
|
|
||||||
jobTemplate:
|
|
||||||
spec:
|
|
||||||
backoffLimit: 2
|
|
||||||
activeDeadlineSeconds: 600
|
|
||||||
template:
|
|
||||||
spec:
|
|
||||||
serviceAccountName: kubectl-rolloutrestart
|
|
||||||
restartPolicy: Never
|
|
||||||
containers:
|
|
||||||
- name: kubectl
|
|
||||||
image: bv11-cr01.bessems.eu/proxy/bitnami/kubectl
|
|
||||||
command:
|
|
||||||
- '/bin/bash'
|
|
||||||
- '-c'
|
|
||||||
args:
|
|
||||||
- for deploy in `kubectl get deployments -n default | cut -d " " -f 1`; do kubectl rollout restart deployment -n default $deploy; done;
|
|
||||||
for deploy in `kubectl get deployments -n unifi | cut -d " " -f 1`; do kubectl rollout restart deployment -n unifi $deploy; done;
|
|
||||||
for deploy in `kubectl get deployments -n pvr | cut -d " " -f 1`; do kubectl rollout restart deployment -n pvr $deploy; done;
|
|
Loading…
Reference in New Issue
Block a user