# Declare the application to deploy the swh services
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: admin-argocd-install
  namespace: argocd
spec:
  project: default
  source:
    repoURL: 'https://github.com/argoproj/argo-cd.git'
    path: manifests/ha
    targetRevision: v2.8.0

    directory:
      recurse: false
      include: install.yaml
  destination:
    server: https://rancher.euwest.azure.internal.softwareheritage.org/k8s/clusters/c-q2wd4
    namespace: argocd
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
    - RespectIgnoreDifferences=true

  ignoreDifferences:
  # The argocd-ssh-known-hosts-cm ConfigMap is redeclared in our descritor to add the forge keys
  - kind: ConfigMap
    name: argocd-ssh-known-hosts-cm
    jsonPointers:
      - /data
      - /metadata/labels
  - kind: ConfigMap
    name: argocd-cm
    jsonPointers:
      - /data
      - /metadata/labels
  - kind: ConfigMap
    name: argocd-rbac-cm
    jsonPointers:
      - /data
      - /metadata/labels

  revisionHistoryLimit: 2