---
# Source: sloth/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: sloth
  namespace: default
  labels:
    helm.sh/chart: sloth-0.3.0
    app.kubernetes.io/managed-by: Helm
    app: sloth
    app.kubernetes.io/name: sloth
    app.kubernetes.io/instance: sloth
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sloth
      app.kubernetes.io/name: sloth
      app.kubernetes.io/instance: sloth
  template:
    metadata:
      labels:
        helm.sh/chart: sloth-0.3.0
        app.kubernetes.io/managed-by: Helm
        app: sloth
        app.kubernetes.io/name: sloth
        app.kubernetes.io/instance: sloth
      annotations:
        kubectl.kubernetes.io/default-container: sloth
    spec:
      serviceAccountName: sloth
      containers:
        - name: sloth
          image: slok/sloth:v0.8.0
          args:
            - kubernetes-controller
            - --sli-plugins-path=/plugins
          ports:
            - containerPort: 8081
              name: metrics
              protocol: TCP
          volumeMounts:
            - name: sloth-common-sli-plugins
              mountPath: /plugins/sloth-common-sli-plugins
          resources:
            limits:
              memory: 150Mi
            requests:
              cpu: 5m
              memory: 75Mi
        - name: git-sync-plugins
          image: k8s.gcr.io/git-sync/git-sync:v3.3.4
          args:
            - --repo=https://github.com/slok/sloth-common-sli-plugins
            - --branch=main
            - --wait=30
            - --webhook-url=http://localhost:8082/-/reload
          volumeMounts:
            - name: sloth-common-sli-plugins
              # Default path for git-sync.
              mountPath: /tmp/git
          resources:
            limits:
              memory: 100Mi
            requests:
              cpu: 5m
              memory: 50Mi
      volumes:
        - name: sloth-common-sli-plugins
          emptyDir: {}