diff --git a/gpulive/jupyter_kustomize/base/tf.yaml b/gpulive/jupyter_kustomize/base/tf.yaml index f4eae3c..9b47130 100644 --- a/gpulive/jupyter_kustomize/base/tf.yaml +++ b/gpulive/jupyter_kustomize/base/tf.yaml @@ -20,10 +20,12 @@ spec: selector: matchLabels: app: tf-notebook + user: user template: metadata: labels: app: tf-notebook + user: user spec: nodeSelector: nodegroup: gpu @@ -52,6 +54,7 @@ metadata: name: tf-notebook labels: app: tf-notebook + user: user spec: type: ClusterIP ports: @@ -60,3 +63,4 @@ spec: targetPort: 8888 selector: app: tf-notebook + user: user diff --git a/gpulive/jupyter_kustomize/overlays/1_jupyter/patch-label.yaml b/gpulive/jupyter_kustomize/overlays/1_jupyter/patch-label.yaml new file mode 100644 index 0000000..f35c7b3 --- /dev/null +++ b/gpulive/jupyter_kustomize/overlays/1_jupyter/patch-label.yaml @@ -0,0 +1,54 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tf-notebook +spec: + replicas: 2 + selector: + matchLabels: + app: tf-notebook + user: user1 + template: + metadata: + labels: + app: tf-notebook + user: user1 + spec: + nodeSelector: + nodegroup: gpu + containers: + - name: tf-notebook + image: tensorflow/tensorflow:2.16.2-gpu-jupyter + resources: + limits: + cpu: "4" + memory: 16Gi + nvidia.com/gpu: 2 + ports: + - containerPort: 8888 + name: notebook + volumeMounts: + - name: notebook-storage + mountPath: /sample + volumes: + - name: notebook-storage + persistentVolumeClaim: + claimName: tf-notebook-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: tf-notebook + labels: + app: tf-notebook + user: user1 +spec: + type: ClusterIP + ports: + - port: 80 + name: http + targetPort: 8888 + selector: + app: tf-notebook + user: user1 + diff --git a/gpulive/jupyter_kustomize/overlays/1_jupyter/test.yaml b/gpulive/jupyter_kustomize/overlays/1_jupyter/test.yaml deleted file mode 100644 index fd6f6bb..0000000 --- a/gpulive/jupyter_kustomize/overlays/1_jupyter/test.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: a1-tf-notebook-pvc - namespace: org2 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - storageClassName: nfs-client ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: a1-tf-notebook - namespace: org2 -spec: - replicas: 1 - selector: - matchLabels: - app: tf-notebook - template: - metadata: - labels: - app: tf-notebook - spec: - containers: - - image: tensorflow/tensorflow:2.16.2-gpu-jupyter - name: tf-notebook - ports: - - containerPort: 8888 - name: notebook - resources: - limits: - nvidia.com/gpu: 1 - volumeMounts: - - mountPath: /sample - name: notebook-storage - nodeSelector: - nodegroup: gpu - volumes: - - name: notebook-storage - persistentVolumeClaim: - claimName: a1-tf-notebook-pvc