---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8s-metric-consumer
  labels:
    app: k8s-metric-consumer
spec:
  replicas: 1 
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: k8s-metric-consumer
  template:
    metadata:
      labels:
        app: k8s-metric-consumer
    spec:
      containers:
        - name: k8s-metric-consumer
          image: registry.local:5000/metric-consumer:1.0
          imagePullPolicy: Always
          env:
            - name: MYSQL_DB_HOST
              value: mysql-service
            - name: MYSQL_DB_PORT
              value: "3306"
            - name: MYSQL_DB_USER
              value: root
            - name: MYSQL_DB_PASSWORD
              value: '12345'
            - name: KAFKA_BROKER
              value: 'kafka.default.svc.cluster.local'
      tolerations:
        - key: node-role.kubernetes.io/master
          effect: NoSchedule
