# This is an example of how fluentd-gcp-scaler can be deployed. Note: this
# example by itself won't work, you need to also set proper RBAC rules and
# ScalingPolicy CRD.
kind: Deployment
metadata:
  name: fluentd-gcp-scaler
  namespace: kube-system
  labels:
    k8s-app: fluentd-gcp-scaler
    version: v0.1
    addonmanager.kubernetes.io/mode: Reconcile
spec:
  selector:
    matchLabels:
      k8s-app: fluentd-gcp-scaler
  template:
    metadata:
      labels:
        k8s-app: fluentd-gcp-scaler
    spec:
      serviceAccountName: fluentd-gcp-scaler
      containers:
      - name: fluentd-gcp-scaler
        image: gcr.io/google-containers/fluentd-gcp-scaler:0.1
        command:
          - /scaler.sh
          - --ds-name
          - fluentd-gcp-v2.0.13
          - --scaling-policy
          - fluentd-gcp-scaling-policy
        env:
        # Defaults, used if no overrides are found in fluentd-gcp-scaling-policy
        - name: CPU_REQUEST
          value: 100m
        - name: MEMORY_REQUEST
          value: 200Mi
        - name: MEMORY_LIMIT
          value: 300Mi
