apiVersion: apps/v1
kind: Deployment
metadata:
  name: smarthotel-server-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: smarthotel-server
  template:
    metadata:
      labels:
        component: smarthotel-server
    spec:
      containers:
        - name: smarthotel-server
          image: shamirj/smarthotel-server
          ports:
            - containerPort: 3000
            # - dnsPolicy: Default
              # resources:
              #   requests:
              #     memory: "64Mi"
              #     cpu: "250m"
              #   limits:
              #     memory: "128Mi"
              #     cpu: "500m"
          env:
          - name: MONGO_URL
            value: mongo-cluster-ip-service
    

# apiVersion: apps/v1
# kind: Deployment
# metadata:
#   name: smarthotel-server-deployment
# spec:
#   replicas: 1
#   selector:
#     matchLabels:
#       component: smarthotel-server
#   template:
#     metadata:
#       labels:
#         component: smarthotel-server
#     spec:
#       containers:
#         - name: smarthotel-server
#           image: shamirj/smarthotel-server
#           ports:
#             - containerPort: 3000
#           # env:
#           #   - name: REDIS_HOST
#           #     value: redis-cluster-ip-service
#           #   - name: REDIS_PORT
#           #     value: '6379'
#           #   - name: PGUSER
#           #     value: postgres
#           #   - name: PGHOST
#           #     value: postgres-cluster-ip-service
#           #   - name: PGPORT
#           #     value: '5432'
#           #   - name: PGDATABASE
#           #     value: postgres
#           #   # - name: PGPASSWORD
#             #   valueFrom:
#             #     secretKeyRef:
#             #       name: pgpassword
#             #       key: PGPASSWORD