Adding redeploy of corona also applicable to rstudio
This commit is contained in:
parent
40428dd75d
commit
20b1a3a8f4
|
|
@ -14,6 +14,14 @@ Cleanup `Error` pods.
|
||||||
kubectl get pods | grep Error | cut -d' ' -f 1 | xargs kubectl delete pod
|
kubectl get pods | grep Error | cut -d' ' -f 1 | xargs kubectl delete pod
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Redeploy a deployment:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
DEPLOYMENT="rstudio"
|
||||||
|
NAMESPACE="datalab"
|
||||||
|
kubectl patch deployment $DEPLOYMENT -n $NAMESPACE -p "{\"spec\": {\"template\": {\"metadata\": { \"labels\": { \"redeploy\": \"$( date +%s )\"}}}}}"
|
||||||
|
```
|
||||||
|
|
||||||
# Deployment
|
# Deployment
|
||||||
|
|
||||||
## namespaces
|
## namespaces
|
||||||
|
|
@ -74,6 +82,14 @@ sudo yum install -y iscsi-initiator-utils
|
||||||
kubectl apply -f longhorn-system/longhorn.yaml
|
kubectl apply -f longhorn-system/longhorn.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## rstudio
|
||||||
|
|
||||||
|
Currently only for one user:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl apply -f datalab/rstudio.yaml
|
||||||
|
```
|
||||||
|
|
||||||
## auth
|
## auth
|
||||||
|
|
||||||
Including:
|
Including:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: rstudio
|
||||||
|
labels:
|
||||||
|
app: rstudio
|
||||||
|
namespace: datalab
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: rstudio
|
||||||
|
replicas: 1
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: rstudio
|
||||||
|
spec:
|
||||||
|
serviceAccountName: redeploy
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: "hub-moritzgraf-de"
|
||||||
|
containers:
|
||||||
|
- image: hub.moritzgraf.de:5000/rstudio:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
name: rstudio
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "2"
|
||||||
|
memory: "2Gi"
|
||||||
|
requests:
|
||||||
|
cpu: "200m"
|
||||||
|
memory: "500Mi"
|
||||||
|
volumeMounts:
|
||||||
|
- name: work
|
||||||
|
mountPath: /home/datalab/
|
||||||
|
env:
|
||||||
|
- name: ROOT
|
||||||
|
value: "true"
|
||||||
|
- name: USER
|
||||||
|
value: datalab
|
||||||
|
- name: PASSWORD
|
||||||
|
value: Schnitzel12
|
||||||
|
ports:
|
||||||
|
- containerPort: 8787
|
||||||
|
volumes:
|
||||||
|
- name: work
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: rstudio
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: rstudio
|
||||||
|
namespace: datalab
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: rstudio
|
||||||
|
namespace: datalab
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 8787
|
||||||
|
targetPort: 8787
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
app: rstudio
|
||||||
|
---
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: rstudio
|
||||||
|
namespace: datalab
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: "nginx"
|
||||||
|
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- "rstudio.haumdaucher.de"
|
||||||
|
secretName: rstudio-haumdaucher-de
|
||||||
|
rules:
|
||||||
|
- host: rstudio.haumdaucher.de
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: rstudio
|
||||||
|
servicePort: 8787
|
||||||
Loading…
Reference in New Issue