apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: loki
spec:
  destination:
    namespace: loki
    server: 'https://kubernetes.default.svc'
  source:
    helm:
      valueFiles:
      - values.yaml
    path: k8s/loki
    repoURL: 'git@bitbucket.org:jamkazam/video-iac.git'
    targetRevision: {{ .Values.gitBranch }}
  project: default
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
      - ServerSideApply=true
    automated:
      prune: true
    retry:
      limit: 5
      backoff:
        duration: 5s
        factor: 2
        maxDuration: 3m
  ignoreDifferences:
    - group: monitoring.grafana.com
      kind: PodLogs
      jsonPointers:
        - /spec/relabelings
    - group: apps
      kind: StatefulSet
      jsonPointers:
        - /spec/replicas
