apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: argocd-git-override
  annotations:
    service.beta.openshift.io/inject-cabundle: "true"
webhooks:
- name: dev.cloudnativetoolkit.argocd-git-override
  namespaceSelector:
    matchExpressions:
    - key: cntk
      operator: In
      values:
      - experiment
  rules:
  - apiGroups:   ["argoproj.io"]
    apiVersions: ["v1alpha1"]
    operations:  ["CREATE","UPDATE"]
    resources:   ["applications","appprojects"]
    scope:       "Namespaced"
  clientConfig:
    service:
      namespace: openshift-gitops
      name: argocd-git-override
      path: "/"
  admissionReviewVersions: ["v1"]
  sideEffects: None