---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: splunk-kubernetes-objects
  labels:
    app: splunk-kubernetes-objects
    version: 1.4.5
spec:
  strategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: splunk-kubernetes-objects
      engine: fluentd
  replicas: 1
  template:
    metadata:
      labels:
        app: splunk-kubernetes-objects
        engine: fluentd
        version: 1.4.5
      annotations: {}
    spec:
      serviceAccountName: splunk-kubernetes-objects
      terminationGracePeriodSeconds: 30
      nodeSelector:
        beta.kubernetes.io/os: linux
      containers:
      - name: splunk-fluentd-k8s-objects
        image: docker.io/splunk/kube-objects:1.1.4
        imagePullPolicy: IfNotPresent
        env:
        - name: MY_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: SPLUNK_HEC_TOKEN
          valueFrom:
            secretKeyRef:
              name: splunk-kubernetes-objects
              key: splunk_hec_token
        - name: SSL_CERT_FILE
          value: "/fluentd/etc/splunk/hec_ca_file"
        resources:
          requests:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - name: conf-configmap
          mountPath: "/fluentd/etc"
        - name: secrets
          mountPath: "/fluentd/etc/splunk"
          readOnly: true
      volumes:
      - name: conf-configmap
        configMap:
          name: splunk-kubernetes-objects
      - name: secrets
        secret:
          secretName: splunk-kubernetes-objects
