apiVersion: apps/v1
kind: Deployment
metadata:
  name: tabpy-deployment-aetp-jlap
  labels:
    app: tabpyjlab
spec:
  replicas: 1
  selector:
    matchLabels:
      app: tabpyjlab
  template:
    metadata:
      labels:
        app: tabpyjlab
    spec:
      containers:
      - name: tabpyjlab
        image: aetp/k8s-tabpy-aetp-jlap:2.3.1
        envFrom:
          - configMapRef:
              name: env-tabpy
        command: ["/bin/sh"]
        args:
          - -c
          - >-
                "start-notebook.sh" &&
                tabpy
        ports:
        - containerPort: 9004
        - containerPort: 8888
        securityContext:
          allowPrivilegeEscalation: false
          privileged: false
        resources:
            limits:
                memory: "4096Mi"
            requests:
                memory: "256Mi"
        volumeMounts:
        - name: tabpynfs
          mountPath: "/tabpy/query_objects"
          subPath : query_objects
        - name: tabpynfs
          mountPath: "/tabpy/state"
          subPath : state
        #volumeMounts:
        - name: tabpynfs
          mountPath: "/home/jovyan"
          subPath: home_jovyan
      volumes:
      - name: tabpynfs
        persistentVolumeClaim:
          claimName: pvc-dyn-nfs-tabpy01         
      #- name: home
      #  persistentVolumeClaim:
      #    claimName: pvc-dyn-nfs-tabpy01

