geocrop-platform./k8s/base/jupyter.yaml

92 lines
1.9 KiB
YAML

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jupyter-workspace-pvc
namespace: geocrop
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jupyter-lab
namespace: geocrop
spec:
replicas: 1
selector:
matchLabels:
app: jupyter-lab
template:
metadata:
labels:
app: jupyter-lab
spec:
containers:
- name: jupyter
image: jupyter/datascience-notebook:python-3.11
env:
- name: JUPYTER_ENABLE_LAB
value: "yes"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: geocrop-secrets
key: minio-access-key
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: geocrop-secrets
key: minio-secret-key
- name: AWS_S3_ENDPOINT_URL
value: http://minio.geocrop.svc.cluster.local:9000
ports:
- containerPort: 8888
volumeMounts:
- name: workspace
mountPath: /home/jovyan/work
volumes:
- name: workspace
persistentVolumeClaim:
claimName: jupyter-workspace-pvc
---
apiVersion: v1
kind: Service
metadata:
name: jupyter-lab
namespace: geocrop
spec:
ports:
- port: 8888
targetPort: 8888
selector:
app: jupyter-lab
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jupyter-ingress
namespace: geocrop
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: nginx
tls:
- hosts:
- lab.techarvest.co.zw
secretName: jupyter-tls
rules:
- host: lab.techarvest.co.zw
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jupyter-lab
port:
number: 8888