Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose service-type as parameter #1136

Merged
merged 5 commits into from
Apr 13, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/kubeflow/deployer/component.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ inputs:
- {name: Namespace, type: String, default: 'kubeflow', description: 'Kubernetes namespace where the TS-serving service should be deployed.'}
- {name: Server name, type: String, default: 'model-server', description: 'TF-serving server name to use when deploying.'}
- {name: PVC name, type: String, default: '' , description: 'Optional PersistentVolumeClaim to use.'}
- {name: Service Type, type: String, default: '' , description: 'Optional Service type to use, two options: "ClusterIP"(default if not set) and "NodePort".'}
Ark-kun marked this conversation as resolved.
Show resolved Hide resolved
#outputs:
# - {name: Endppoint URI, type: Serving URI, description: 'URI of the deployed prediction service..'}
implementation:
Expand All @@ -18,4 +19,5 @@ implementation:
--namespace, {inputValue: Namespace},
--server-name, {inputValue: Server name},
--pvc-name, {inputValue: PVC name},
--service-type, {inputValue: Service type},
]
10 changes: 10 additions & 0 deletions components/kubeflow/deployer/src/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ while (($#)); do
PVC_NAME="$1"
shift
;;
"--service-type")
shift
SERVICE_TYPE="$1"
shift
;;
*)
echo "Unknown argument: '$1'"
exit 1
Expand Down Expand Up @@ -100,6 +105,11 @@ echo "Generating the TF Serving config..."
ks generate tf-serving server --name="${SERVER_NAME}"
ks param set server modelPath "${MODEL_EXPORT_PATH}"

# service type: ClusterIP or NodePort
if [ -n "${SERVICE_TYPE}" ];then
ks param set server serviceType "${SERVICE_TYPE}"
fi

# support local storage to deploy tf-serving.
if [ -n "${PVC_NAME}" ];then
# TODO: Remove modelStorageType setting after the hard code nfs was removed at
Expand Down