{
  "description": "Provider is the Schema for the providers API",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "ProviderSpec defines the desired state of the Provider.",
      "properties": {
        "address": {
          "description": "Address specifies the endpoint, in a generic sense, to where alerts are sent.\nWhat kind of endpoint depends on the specific Provider type being used.\nFor the generic Provider, for example, this is an HTTP/S address.\nFor other Provider types this could be a project ID or a namespace.",
          "maxLength": 2048,
          "type": [
            "string",
            "null"
          ]
        },
        "certSecretRef": {
          "additionalProperties": false,
          "description": "CertSecretRef specifies the Secret containing TLS certificates\nfor secure communication.\n\nSupported configurations:\n- CA-only: Server authentication (provide ca.crt only)\n- mTLS: Mutual authentication (provide ca.crt + tls.crt + tls.key)\n- Client-only: Client authentication with system CA (provide tls.crt + tls.key only)\n\nLegacy keys \"caFile\", \"certFile\", \"keyFile\" are supported but deprecated. Use \"ca.crt\", \"tls.crt\", \"tls.key\" instead.",
          "properties": {
            "name": {
              "description": "Name of the referent.",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "channel": {
          "description": "Channel specifies the destination channel where events should be posted.",
          "maxLength": 2048,
          "type": [
            "string",
            "null"
          ]
        },
        "commitStatusExpr": {
          "description": "CommitStatusExpr is a CEL expression that evaluates to a string value\nthat can be used to generate a custom commit status message for use\nwith eligible Provider types (github, gitlab, gitea, bitbucketserver,\nbitbucket, azuredevops). Supported variables are: event, provider,\nand alert.",
          "type": [
            "string",
            "null"
          ]
        },
        "proxySecretRef": {
          "additionalProperties": false,
          "description": "ProxySecretRef specifies the Secret containing the proxy configuration\nfor this Provider. The Secret should contain an 'address' key with the\nHTTP/S address of the proxy server. Optional 'username' and 'password'\nkeys can be provided for proxy authentication.",
          "properties": {
            "name": {
              "description": "Name of the referent.",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "secretRef": {
          "additionalProperties": false,
          "description": "SecretRef specifies the Secret containing the authentication\ncredentials for this Provider.",
          "properties": {
            "name": {
              "description": "Name of the referent.",
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": [
            "object",
            "null"
          ]
        },
        "serviceAccountName": {
          "description": "ServiceAccountName is the name of the Kubernetes ServiceAccount used to\nauthenticate with cloud provider services through object identity.\nThis enables multi-tenant authentication without storing static credentials.\n\nSupported provider types: azureeventhub, azuredevops, googlepubsub\n\nWhen specified, the controller will:\n1. Create an OIDC token for the specified ServiceAccount\n2. Exchange it for cloud provider credentials via STS\n3. Use the obtained credentials for API authentication\n\nWhen unspecified, the controller's workload identity is used (single-tenant).\n\nAn error is thrown if static credentials are also defined in SecretRef.",
          "type": [
            "string",
            "null"
          ]
        },
        "suspend": {
          "description": "Suspend tells the controller to suspend subsequent\nevents handling for this Provider.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "timeout": {
          "description": "Timeout for sending alerts to the Provider.",
          "pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$",
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "description": "Type specifies which Provider implementation to use.",
          "enum": [
            "slack",
            "discord",
            "msteams",
            "rocket",
            "generic",
            "generic-hmac",
            "github",
            "gitlab",
            "gitea",
            "giteapullrequestcomment",
            "bitbucketserver",
            "bitbucket",
            "azuredevops",
            "googlechat",
            "googlepubsub",
            "webex",
            "sentry",
            "azureeventhub",
            "telegram",
            "lark",
            "matrix",
            "opsgenie",
            "alertmanager",
            "grafana",
            "githubdispatch",
            "githubpullrequestcomment",
            "gitlabmergerequestcomment",
            "pagerduty",
            "datadog",
            "nats",
            "zulip",
            "otel",
            "zoom",
            "incident.io",
            "mastodon"
          ],
          "type": "string"
        },
        "username": {
          "description": "Username specifies the name under which events are posted.",
          "maxLength": 2048,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "type"
      ],
      "type": [
        "object",
        "null"
      ],
      "x-kubernetes-validations": [
        {
          "message": "spec.commitStatusExpr is only supported for the 'github', 'gitlab', 'gitea', 'bitbucketserver', 'bitbucket', 'azuredevops' provider types",
          "rule": "self.type == 'github' || self.type == 'gitlab' || self.type == 'gitea' || self.type == 'bitbucketserver' || self.type == 'bitbucket' || self.type == 'azuredevops' || !has(self.commitStatusExpr)"
        }
      ]
    }
  },
  "type": "object"
}