apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: mypropertyqr-prod
  name: mypropertyqr-fmb-refixing-v2-prod
  labels:
    app: mypropertyqr-fmb-refixing-v2-prod
spec:
  replicas: 2
  selector:
    matchLabels:
      app: mypropertyqr-fmb-refixing-v2-prod
  template:
    metadata:
      labels:
        app: mypropertyqr-fmb-refixing-v2-prod
    spec:
      containers:
      - name: mypropertyqr-fmb-refixing-v2-prod
        image: 048245609775.dkr.ecr.ap-south-1.amazonaws.com/fmb-refixing-v2-goapp-prod:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        resources:
           requests:
            cpu: "256m"
            memory: "256Mi"
           limits: 
            cpu: "512m"
            memory: "512Mi"
        env:
        - name: NODE_OPTIONS    # For Node.js apps to increase heap size explicitly
          value: "--max-old-space-size=126"     
        livenessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 20
          periodSeconds: 10
          timeoutSeconds: 5
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 10
          periodSeconds: 5
          failureThreshold: 3
          
##SVC Exposing as clusterIP
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: mypropertyqr-fmb-refixing-v2-prod
  name: mypropertyqr-fmb-refixing-v2-prod
  namespace: mypropertyqr-prod
spec:
  ports:
  - port: 3000
    protocol: TCP
  selector:
    app: mypropertyqr-fmb-refixing-v2-prod                  
