diff --git a/install.yaml b/install.yaml index 472ced3..9e2630c 100644 --- a/install.yaml +++ b/install.yaml @@ -33,6 +33,14 @@ spec: value: "!bd832W0@CG" - name: ASE_KEY value: A5es$&!0GeoEast + volumeMounts: + - name: persistent-storage + mountPath: /nfs + volumes: + - name: persistent-storage + nfs: + server: 192.168.252.250 + path: /mnt/CGdata/ms --- apiVersion: v1 kind: Service diff --git a/src/app_model.go b/src/app_model.go index a1ed78b..9c7e2e4 100644 --- a/src/app_model.go +++ b/src/app_model.go @@ -8,15 +8,16 @@ import ( ) type AppModel struct { - Id int - AppName string - UserName string - Image string - Command string - Comment string - Env string - SvcName string - Ports string + Id int + AppName string + UserName string + Image string + Command string + Comment string + Env string + SvcName string + Ports string + PersistentPath string } func (*AppModel) TableName() string { diff --git a/test/jupyter.yaml b/test/jupyter.yaml new file mode 100644 index 0000000..a9bf186 --- /dev/null +++ b/test/jupyter.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Service +metadata: + name: jupyter + labels: + app: jupyter +spec: + ports: + - port: 30000 + name: http + targetPort: 8888 + nodePort: 30000 + selector: + app: jupyter + type: LoadBalancer +--- +apiVersion: v1 +kind: Pod +metadata: + name: jupyter + labels: + app: jupyter +spec: + containers: + - name: jupyter + image: jupyter/minimal-notebook:lab-3.6.1 + command: ["bash", "-c", "source /etc/bash.bashrc && jupyter lab --ip 0.0.0.0 --port 8888 --no-browser --allow-root --NotebookApp.token=''"] + ports: + - containerPort: 8888 + protocol: TCP + name: http + volumeMounts: + - name: persistent-storage + mountPath: /this/is/nfs + volumes: + - name: persistent-storage + nfs: + server: 192.168.252.250 + path: /mnt/CGdata/ms/test_dir \ No newline at end of file