# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# An example k8s batch job that generates prediction requests to a tensorflow
# serving instance serving inception v3 model.

apiVersion: batch/v1
kind: Job
metadata:
  name: inception-client
spec:
  template:
    spec:
      containers:
      - name: inception-client
        image: gcr.io/vishnuk-cloud/tf-inception-client@sha256:0f7f5fede9a836b8ddd1a7e9c65262de27502acc6088c746a1b035eee5da7cfa
        args: ["inception_profiler.py", "--server=tensorflow-service", "--port=9000", "-n", "10000", "./cat_sample.jpg"]
      restartPolicy: OnFailure
  backoffLimit: 4
  completions: 100
  parallelism: 10

