apiVersion: apps/v1
kind: Deployment
metadata:
  name: floorplan-webapp
  namespace: sensor-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: floorplan-webapp
  template:
    metadata:
      labels:
        app: floorplan-webapp
    spec:
      containers:
      - name: webapp
        image: floorplan-webapp:latest
        imagePullPolicy: Never
        ports:
        - containerPort: 5000
        env:
        - name: MYSQL_HOST
          value: mysql-service.sensor-app
        resources:
          requests:
            memory: "128Mi"
            cpu: "100m"
          limits:
            memory: "256Mi"
            cpu: "200m"