apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: gitea
  namespace: argocd
  labels:
    env: dev-tools
spec:
  project: dev-tools
  source:
    repoURL: 'ssh://git@gitea-ssh.dev-tools.svc.cluster.local:2222/dvirlabs/dev-tools.git'
    targetRevision: HEAD
    path: charts/helm-gitea
    helm:
      valueFiles:
        - ../../manifests/gitea/values.yaml
  destination:
    server: https://kubernetes.default.svc
    namespace: dev-tools
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
      - PrunePropagationPolicy=foreground
      - RespectIgnoreDifferences=true
  ignoreDifferences:
    - group: apps
      kind: StatefulSet
      namespace: dev-tools
      jsonPointers:
        - /spec/volumeClaimTemplates
    - kind: PersistentVolumeClaim
      namespace: dev-tools
      jsonPointers:
        - /status
        - /spec/volumeName
    - kind: Service
      namespace: dev-tools
      jsonPointers:
        - /spec/clusterIP
        - /spec/clusterIPs