Housekeeping

This commit is contained in:
Danny Bessems 2020-12-08 08:54:12 +01:00
parent 93683f68d3
commit d0887b71a2
6 changed files with 40 additions and 4 deletions

View File

@ -9,7 +9,7 @@
## K3s cluster
On first node:
```
curl -sfL https://get.k3s.io | sh -s - --no-deploy traefik
curl -sfL https://get.k3s.io | sh -s - --disable local-path,traefik
cat /var/lib/rancher/k3s/server/token
kubectl config view --raw
```

View File

@ -23,6 +23,8 @@ spec:
selector:
matchLabels:
app: plex
strategy:
type: Recreate
template:
metadata:
labels:

View File

@ -1,2 +1,5 @@
csi:
kubeletRootDir: /var/lib/kubelet
defaultSettings:
# defaultDataPath: /var/lib/longhorn/
defaultDataPath: /mnt/blockstorage/

View File

@ -18,7 +18,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: kubectl-rolloutrestart
name: kubectl-rolloutrestart-default
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
@ -29,6 +29,34 @@ subjects:
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:
@ -51,6 +79,9 @@ spec:
- name: kubectl
image: bv11-cr01.bessems.eu/proxy/bitnami/kubectl
command:
- 'bash'
- '/bin/bash'
- '-c'
- 'for deploy in `kubectl get deployments | cut -d " " -f 1`; do kubectl rollout restart deployment $deploy; done'
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;