apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  annotations:
    include.release.openshift.io/hypershift: "true"
    include.release.openshift.io/ibm-cloud-managed: "true"
    include.release.openshift.io/self-managed-high-availability: "true"
    include.release.openshift.io/single-node-developer: "true"
  creationTimestamp: "2025-10-27T11:44:15Z"
  generation: 2
  labels:
    app.kubernetes.io/managed-by: cluster-version-operator
    app.kubernetes.io/part-of: openshift-monitoring
  name: monitoringconfigmaps.openshift.io
  ownerReferences:
  - apiVersion: config.openshift.io/v1
    controller: true
    kind: ClusterVersion
    name: version
    uid: d36bdf59-d268-4238-afb0-5e0b21cca1a4
  resourceVersion: "22711"
  uid: 5721664f-ed62-4146-aa21-0ca4d025083a
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    service:
      name: cluster-monitoring-operator
      namespace: openshift-monitoring
      path: /validate-webhook/monitoringconfigmaps
      port: 8443
  failurePolicy: Ignore
  matchConditions:
  - expression: (request.namespace == "openshift-monitoring" && request.name == "cluster-monitoring-config")
      || (request.namespace == "openshift-user-workload-monitoring" && request.name
      == "user-workload-monitoring-config")
    name: monitoringconfigmaps
  - expression: '!has(object.metadata.labels) || !("monitoringconfigmaps.openshift.io/skip-validate-webhook"
      in object.metadata.labels) || object.metadata.labels["monitoringconfigmaps.openshift.io/skip-validate-webhook"]
      != "true"'
    name: not-skipped
  matchPolicy: Equivalent
  name: monitoringconfigmaps.openshift.io
  namespaceSelector:
    matchExpressions:
    - key: kubernetes.io/metadata.name
      operator: In
      values:
      - openshift-monitoring
      - openshift-user-workload-monitoring
  objectSelector: {}
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    - UPDATE
    resources:
    - configmaps
    scope: Namespaced
  sideEffects: None
  timeoutSeconds: 5
