Skip to content

Commit 9b0d5dd

Browse files
author
tylertitsworth
committed
add pvc reuse
Signed-off-by: tylertitsworth <tyler.titsworth@intel.com>
1 parent f56f8cc commit 9b0d5dd

File tree

5 files changed

+17
-26
lines changed

5 files changed

+17
-26
lines changed

workflows/charts/tensorflow-serving/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type: application
3333
# This is the chart version. This version number should be incremented each time you make changes
3434
# to the chart and its templates, including the app version.
3535
# Versions are expected to follow Semantic Versioning (https://semver.org/)
36-
version: 0.1.0
36+
version: 0.1.1
3737

3838
# This is the version number of the application being deployed. This version number should be
3939
# incremented each time you make changes to the application. Versions are not expected to

workflows/charts/tensorflow-serving/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
TensorFlow Serving is a flexible, high-performance serving system for machine learning models, designed for production environments. TensorFlow Serving makes it easy to deploy new algorithms and experiments, while keeping the same server architecture and APIs. TensorFlow Serving provides out-of-the-box integration with TensorFlow models, but can be easily extended to serve other types of models and data.
44

5-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
5+
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
66

77
## Installation
88

@@ -24,10 +24,12 @@ Then, follow the installation notes to test the deployment
2424
| deploy.resources.limits | object | `{"cpu":"4000m","gpu.intel.com/i915":1,"memory":"1Gi"}` | Maximum resources per pod |
2525
| deploy.resources.limits."gpu.intel.com/i915" | int | `1` | Intel GPU Device Configuration |
2626
| deploy.resources.requests | object | `{"cpu":"1000m","memory":"512Mi"}` | Minimum resources per pod |
27-
| deploy.storage.nfs | object | `{"enabled":false,"path":"nil","readOnly":true,"server":"nil"}` | Network File System (NFS) storage for models |
2827
| fullnameOverride | string | `""` | Full qualified Domain Name |
2928
| nameOverride | string | `""` | Name of the serving service |
29+
| pvc.create | bool | `false` | Create PVC instead of reuse |
30+
| pvc.name | string | `""` | Name of the PVC |
3031
| pvc.size | string | `"5Gi"` | Size of the storage |
32+
| pvc.storageClassName | string | `""` | Storage class name |
3133
| service.type | string | `"NodePort"` | Type of service |
3234

3335
----------------------------------------------

workflows/charts/tensorflow-serving/templates/deployment.yaml

+1-14
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,14 @@ spec:
5858
volumeMounts:
5959
- mountPath: /dev/shm
6060
name: dshm
61-
{{- if .Values.deploy.storage.nfs.enabled }}
6261
- name: model
6362
mountPath: /models/{{ .Values.deploy.modelName }}
64-
{{- else }}
65-
- name: model
66-
mountPath: /models/{{ .Values.deploy.modelName }}
67-
{{- end }}
6863
resources:
6964
{{- toYaml .Values.deploy.resources | nindent 12 }}
7065
volumes:
7166
- name: dshm
7267
emptyDir:
7368
medium: Memory
74-
{{- if .Values.deploy.storage.nfs.enabled }}
75-
- name: model
76-
nfs:
77-
server: {{ .Values.deploy.storage.nfs.server }}
78-
path: {{ .Values.deploy.storage.nfs.path }}
79-
readOnly: {{ .Values.deploy.storage.nfs.readOnly }}
80-
{{- else }}
8169
- name: model
8270
persistentVolumeClaim:
83-
claimName: {{ include "tensorflow-serving.fullname" . }}-model-dir
84-
{{- end }}
71+
claimName: {{ .Values.pvc.name }}

workflows/charts/tensorflow-serving/templates/pvc.yaml

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,18 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
{{- if .Values.pvc.create -}}
1516
---
16-
{{- if not .Values.deploy.storage.nfs.enabled }}
1717
apiVersion: v1
1818
kind: PersistentVolumeClaim
1919
metadata:
20-
name: {{ include "tensorflow-serving.fullname" . }}-model-dir
20+
name: {{ .Values.pvc.name }}
2121
labels:
2222
{{- include "tensorflow-serving.labels" . | nindent 4 }}
2323
spec:
24+
{{- if .Values.pvc.storageClassName }}
25+
storageClassName: {{ .Values.pvc.storageClassName }}
26+
{{- end }}
2427
accessModes:
2528
- ReadWriteMany
2629
resources:

workflows/charts/tensorflow-serving/values.yaml

+6-7
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ deploy:
3838
requests:
3939
cpu: 1000m
4040
memory: 512Mi
41-
storage:
42-
# -- Network File System (NFS) storage for models
43-
nfs:
44-
enabled: false
45-
server: nil
46-
path: nil
47-
readOnly: true
4841
service:
4942
# -- Type of service
5043
type: NodePort
5144
pvc:
45+
# -- Create PVC instead of reuse
46+
create: false
47+
# -- Name of the PVC
48+
name: ""
49+
# -- Storage class name
50+
storageClassName: ""
5251
# -- Size of the storage
5352
size: 5Gi

0 commit comments

Comments
 (0)