apiVersion: apps/v1
kind: Deployment
metadata:
  name: tile-changer-ign-deployment
  labels:
    app: tile-changer
    tier: backend
    target: ign
  namespace: tile-changer
spec:
  replicas: 3
  selector:
    matchLabels:
      app: tile-changer-ign
      tier: backend
      target: ign
  template:
    metadata:
      labels:
        app: tile-changer-ign
        tier: backend
        target: ign
    spec:
      containers:
      - name: tile-changer
        image: jdayllon/tile-changer:lastest
        ports:
          - containerPort: 80
        env:
         - name: TARGET_HOST
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: TARGET_HOST_IGN
         - name: CACHE_TYPE
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: CACHE_TYPE
         - name: CACHE_REDIS_HOST
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: CACHE_REDIS_HOST
         - name: CACHE_REDIS_PORT
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: CACHE_REDIS_PORT
         - name: CACHE_REDIS_PASSWORD
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: CACHE_REDIS_PASSWORD
         - name: CACHE_REDIS_DB
           valueFrom:
            configMapKeyRef:
              name: cfm-tile-changer
              key: CACHE_REDIS_DB