---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
  - https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github_user/argoproj/argo-cd/refs/tags/v3.3.2/manifests/ha/install.yaml
  - https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github/kubernetes-sigs/gateway-api/releases/download/v1.5.1/standard-install.yaml
  - au-syd1-apps.yaml
  - argocd-self-app.yaml
  # Authentik OIDC: expose argocd-server and wire the client secret from Vault.
  - argocd-server-gateway.yaml
  - argocd-server-httproute.yaml
  - argocd-oidc-vaultauth.yaml
  - argocd-oidc-vaultstaticsecret.yaml

patches:
  - path: argocd-cm-patch.yaml
    target:
      kind: ConfigMap
      name: argocd-cm
  - path: argocd-rbac-cm-patch.yaml
    target:
      kind: ConfigMap
      name: argocd-rbac-cm
  - path: argocd-cmd-params-cm-patch.yaml
    target:
      kind: ConfigMap
      name: argocd-cmd-params-cm
  - path: argocd-tls-certs-patch.yaml
    target:
      kind: ConfigMap
      name: argocd-tls-certs-cm
  - path: argocd-repo-server-vault-ca-patch.yaml
    target:
      kind: Deployment
      name: argocd-repo-server
