apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: prow
spec:
  goTemplate: true
  generators:
    - clusters:
        selector:
          matchLabels:
            clusterType: 'prow'
  template:
    metadata:
      name: '{{ .name }}'
    spec:
      destination:
        namespace: "{{ .metadata.labels.prowNamespace }}"
        server: "{{ .server }}"
      project: default
      sources:
        - path: kubernetes/{{ .name }}/prow
          repoURL: https://github.com/kubernetes/k8s.io
          targetRevision: main
        - path: kubernetes/{{ .name }}/prow/crds
          repoURL: https://github.com/kubernetes/k8s.io
          targetRevision: main
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
