apiVersion: apps/v1
kind: Deployment
metadata:
  name: hyperauth-log-collector
  namespace: hyperauth
  labels:
    hyperauth: log
    name: hyperauth-log-collector
spec:
  replicas: 1
  selector:
    matchLabels:
      hyperauth: log
  template:
    metadata:
      name: hyperauth-log-collector
      labels:
        hyperauth: log
    spec:
      nodeSelector:
        kubernetes.io/hostname: ck4-1
      imagePullSecrets:
      - name : docker-pull-secret
      serviceAccount: hyperauth-admin
      containers:
      - name: log-collector
        image: tmaxcloudck/hyperauth-log-collector:b0.0.0.8
        imagePullPolicy: Always
        env:
        - name: TZ
          value: Asia/Seoul
        - name: NAMESPACE
          value: "hyperauth"
        volumeMounts:
        - name: log
          mountPath: /go/src/logs
        - name: build
          mountPath: /go/src/build
        resources:
          limits:
            cpu: "0.1"
            memory: "128Mi"
          requests:
            cpu: "0.1"
            memory: "128Mi"
      volumes:
      - name: log
        hostPath:
          path: /root/keycloak/hyperauth-log-collector/logs
      - name: build
        hostPath:
          path: /root/keycloak/hyperauth-log-collector/build 
