apiVersion: apps/v1
kind: Deployment
metadata:
  name: mqtt-generator
  namespace: dt
  labels:
    app: mqtt-generator
    component: mqtt-generator
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mqtt-generator
      component: mqtt-generator
  template:
    metadata:
      labels:
        app: mqtt-generator
        component: mqtt-generator
    spec:
      #securityContext:
        #runAsUser: 1001
        #fsGroup: 1001
      containers:
      - name: mqtt-generator
        #imagePullPolicy: IfNotPresent
        imagePullPolicy: Always
        image: openmcp/keti-mqtt-generator:v1.1
        command: ["/app/start_mqtt.sh"]
        resources:
          requests:
            memory: 256M
            cpu: 125m
          limits:
            memory: 256M
            cpu: 125m
        env:
        - name: COMPANY_NAME
          value: "SHINHAN"
        - name: CRANE_NAME
          value: "Crane_1"
        - name: IOT_GATEWAY_IP
          value: "iot-gateway-svc.dt.svc.cluster.local"
        - name: MQTT_PORT
          value: "1883"
        - name: GEN_PERIOD_SEC
          value: "3"
      imagePullSecrets:
      - name: regcred

