apiVersion: apps/v1
kind: Deployment
metadata:
   name: novisync-web-react-front-prod
   namespace: nodejsprod
spec:
   replicas: 1
   selector:
     matchLabels:
       app: novisync-web-react-front-prod-app
   template:
      metadata:
        labels:
          app: novisync-web-react-front-prod-app
      spec:
        
        containers:
        - image: docker-registry-server:5000/novisync-web-react-front-prod:tagVersion
          name: novisync-web-react-front-prod-cont
          resources:
                  requests:
                          memory: "1Mi"
                          cpu: "0.1"
                  limits:
                          memory: "1000Mi"
                          cpu: "0.7"
          

---
apiVersion: v1
kind: Service
metadata:
  name: novisync-web-react-front-prod-svc
  namespace: nodejsprod
spec:
  selector:
     app: novisync-web-react-front-prod-app
  type: NodePort
  ports:
    - nodePort: 31194
      port: 5000
      targetPort: 5000
      
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
  name: novisync-web-react-front-prod-autoscale
  namespace: nodejsprod
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: novisync-web-react-front-prod
  minReplicas: 1
  maxReplicas: 5
  targetCPUUtilizationPercentage: 75