def rule(event):
    if all(
        [
            event.deep_get("gcp", "audit", "method_name", default="").startswith(
                "admissionregistration.k8s.io.v"
            ),
            any(
                [
                    ".mutatingwebhookconfigurations."
                    in event.deep_get("gcp", "audit", "method_name", default=""),
                    ".validatingwebhookconfigurations."
                    in event.deep_get("gcp", "audit", "method_name", default=""),
                ]
            ),
            any(
                [
                    event.deep_get("gcp", "audit", "method_name", default="").endswith("create"),
                    event.deep_get("gcp", "audit", "method_name", default="").endswith("patch"),
                    event.deep_get("gcp", "audit", "method_name", default="").endswith("replace"),
                ]
            ),
        ]
    ):
        return True
    return False
