apiVersion: apps/v1
kind: Deployment
metadata:
  name: ngrinder-controller
spec:
  selector:
    matchLabels:
      app: ngrinder-controller
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: ngrinder-controller
    spec:
      containers:
      - image: ngrinder/controller:latest
        name: ngrinder-controller
        ports:
        - containerPort: 80
        - containerPort: 16001
        - containerPort: 12000
        - containerPort: 12001
        - containerPort: 12002
        - containerPort: 12003
        - containerPort: 12004
        - containerPort: 12005
        - containerPort: 12006
        - containerPort: 12007
        - containerPort: 12008
        - containerPort: 12009
        imagePullPolicy: IfNotPresent
        resources:
          limits:
            cpu: 1000m
            memory: 1024Mi
          requests:
            cpu: 500m
            memory: 512Mi
        volumeMounts:
        - name: persistent-storage
          mountPath: /opt/ngrinder-controller
      volumes:
      - name: persistent-storage
        persistentVolumeClaim:
          claimName: ngrinder-controller
