kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
  name: { { .Values.logs.name } }
  namespace: { { .Values.logs.namespace | default .Values.namespace } }
spec:
  lookupPolicy:
    local: false
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: { { .Values.logs.name } }
  namespace: { { .Values.logs.namespace | default .Values.namespace } }
  annotations:
    alpha.image.policy.openshift.io/resolve-names: '*'
    app.openshift.io/route-disabled: 'false'
    image.openshift.io/triggers: |
      [{ "from": { "kind": "ImageStreamTag", "name": "{{ .Values.image }}:{{ .Values.tag }}", "namespace": "{{ .Values.logs.namespace | default .Values.namespace }}" }, "fieldPath": "spec.template.spec.containers[?(@.name=='{{ .Values.logs.name }}')].image", "pause": "false" }]

spec:
  replicas: { { .Values.logs.replicas } }
  selector:
    matchLabels:
      app: { { .Values.logs.name } }
  template:
    metadata:
      labels:
        app: { { .Values.logs.name } }
    spec:
      containers:
        - name: { { .Values.logs.name } }
          image: '{{ .Values.logs.image }}:{{ .Values.logs.tag }}'
          imagePullPolicy: { { .Values.image.pullPolicy } }
          ports:
            - containerPort: { { .Values.logs.port } }
              protocol: TCP
          envFrom:
            - configMapRef:
                name: { { .Values.logs.configMap.name } }
      restartPolicy: Always

---

