apiVersion: apps/v1
kind: Deployment
metadata:
  name: object-detection-deployment
spec:
  selector:
    matchLabels:
      app: object-detection
  replicas: 1
  template:
    metadata:
      labels:
        app: object-detection
    spec:
      containers:
      - name: object-detection
        image: docker.io/karve/object-detection-raspberrypi4
        imagePullPolicy: IfNotPresent
        #command: ["/bin/bash","-c","sleep infinity"]
        securityContext:
          privileged: true
        env:
          - name: WebSocketURL
            value: "wss://mynodered.mybluemix.net/ws/chat"
          - name: ImageUploadURL
            value: "http://mynodered.mybluemix.net/upload"
        ports:
        - containerPort: 8080
        # resource required for hpa
        resources:
          requests:
            memory: 128M
            cpu: 125m
          limits:
            memory: 1024M
            cpu: 1000m
      hostAliases:
      - hostnames:
        - mynodered.mybluemix.net
        ip: 169.46.89.149
