apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: resnet50v1-5-fp32-inference # {"$openapi":"MODEL_SERVING_NAME"}
spec:
  selector:
    matchLabels:
      app: resnet50v1-5-fp32-server # {"$openapi":"MODEL_SERVING_LABEL"}
  replicas: 3 # {"$openapi":"REPLICAS"}
  template:
    metadata:
      labels:
        app: resnet50v1-5-fp32-server # {"$openapi":"MODEL_SERVING_LABEL"}
    spec:
      securityContext:
        runAsUser: 0 # {"$openapi":"USER_ID"}
        runAsGroup: 0 # {"$openapi":"GROUP_ID"}
        fsGroup: 0 # {"$openapi":"FS_ID"}
      containers:
      - name: model-server
        image: docker.io/intel/intel-optimized-tensorflow-serving:latest # {"$openapi":"IMAGE"}
        envFrom:
        - configMapRef:
            name: resnet50v1-5-fp32-inference # {"$openapi":"MODEL_SERVING_NAME"}
        volumeMounts:
        - name: models
          mountPath: /models # {"$openapi":"MODEL_BASE_PATH"}
        ports:
        - containerPort: 8500 # {"$openapi":"MODEL_PORT"}
      volumes:
      - name: models
        hostPath:
          path: /models # {"$openapi":"MODEL_DIR"}
