cue.dev/x/crd/fluxcd.io@v0.9.0

notification/v1beta3/Provider.cue raw

  1package v1beta3
  2
  3import "strings"
  4
  5// Provider is the Schema for the providers API
  6#Provider: {
  7	_embeddedResource
  8
  9	// APIVersion defines the versioned schema of this representation of an object.
 10	// Servers should convert recognized schemas to the latest internal value, and
 11	// may reject unrecognized values.
 12	// More info:
 13	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 14	apiVersion?: string
 15
 16	// Kind is a string value representing the REST resource this object represents.
 17	// Servers may infer this from the endpoint the client submits requests to.
 18	// Cannot be updated.
 19	// In CamelCase.
 20	// More info:
 21	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 22	kind?:     string
 23	metadata?: {}
 24
 25	// ProviderSpec defines the desired state of the Provider.
 26	spec?: {
 27		// Address specifies the endpoint, in a generic sense, to where alerts are sent.
 28		// What kind of endpoint depends on the specific Provider type being used.
 29		// For the generic Provider, for example, this is an HTTP/S address.
 30		// For other Provider types this could be a project ID or a namespace.
 31		address?: strings.MaxRunes(
 32			2048,
 33		)
 34
 35		// CertSecretRef specifies the Secret containing TLS certificates
 36		// for secure communication.
 37		//
 38		// Supported configurations:
 39		// - CA-only: Server authentication (provide ca.crt only)
 40		// - mTLS: Mutual authentication (provide ca.crt + tls.crt + tls.key)
 41		// - Client-only: Client authentication with system CA (provide tls.crt + tls.key only)
 42		//
 43		// Legacy keys "caFile", "certFile", "keyFile" are supported but deprecated. Use
 44		// "ca.crt", "tls.crt", "tls.key" instead.
 45		certSecretRef?: {
 46			// Name of the referent.
 47			name!: string
 48		}
 49
 50		// Channel specifies the destination channel where events should be posted.
 51		channel?: strings.MaxRunes(
 52			2048,
 53		)
 54
 55		// CommitStatusExpr is a CEL expression that evaluates to a string value
 56		// that can be used to generate a custom commit status message for use
 57		// with eligible Provider types (github, gitlab, gitea, bitbucketserver,
 58		// bitbucket, azuredevops). Supported variables are: event, provider,
 59		// and alert.
 60		commitStatusExpr?: string
 61
 62		// Interval at which to reconcile the Provider with its Secret references.
 63		// Deprecated and not used in v1beta3.
 64		interval?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
 65
 66		// Proxy the HTTP/S address of the proxy server.
 67		// Deprecated: Use ProxySecretRef instead. Will be removed in v1.
 68		proxy?: strings.MaxRunes(
 69			2048,
 70		) &
 71		=~"^(http|https)://.*$"
 72
 73		// ProxySecretRef specifies the Secret containing the proxy configuration
 74		// for this Provider. The Secret should contain an 'address' key with the
 75		// HTTP/S address of the proxy server. Optional 'username' and 'password'
 76		// keys can be provided for proxy authentication.
 77		proxySecretRef?: {
 78			// Name of the referent.
 79			name!: string
 80		}
 81
 82		// SecretRef specifies the Secret containing the authentication
 83		// credentials for this Provider.
 84		secretRef?: {
 85			// Name of the referent.
 86			name!: string
 87		}
 88
 89		// ServiceAccountName is the name of the Kubernetes ServiceAccount used to
 90		// authenticate with cloud provider services through workload identity.
 91		// This enables multi-tenant authentication without storing static credentials.
 92		//
 93		// Supported provider types: azureeventhub, azuredevops, googlepubsub
 94		//
 95		// When specified, the controller will:
 96		// 1. Create an OIDC token for the specified ServiceAccount
 97		// 2. Exchange it for cloud provider credentials via STS
 98		// 3. Use the obtained credentials for API authentication
 99		//
100		// When unspecified, controller-level authentication is used (single-tenant).
101		//
102		// An error is thrown if static credentials are also defined in SecretRef.
103		// This field requires the ObjectLevelWorkloadIdentity feature gate to be enabled.
104		serviceAccountName?: string
105
106		// Suspend tells the controller to suspend subsequent
107		// events handling for this Provider.
108		suspend?: bool
109
110		// Timeout for sending alerts to the Provider.
111		timeout?: =~"^([0-9]+(\\.[0-9]+)?(ms|s|m))+$"
112
113		// Type specifies which Provider implementation to use.
114		type!: "slack" |
115			"discord" |
116			"msteams" |
117			"rocket" |
118			"generic" |
119			"generic-hmac" |
120			"github" |
121			"gitlab" |
122			"gitea" |
123			"giteapullrequestcomment" |
124			"bitbucketserver" |
125			"bitbucket" |
126			"azuredevops" |
127			"googlechat" |
128			"googlepubsub" |
129			"webex" |
130			"sentry" |
131			"azureeventhub" |
132			"telegram" |
133			"lark" |
134			"matrix" |
135			"opsgenie" |
136			"alertmanager" |
137			"grafana" |
138			"githubdispatch" |
139			"githubpullrequestcomment" |
140			"gitlabmergerequestcomment" |
141			"pagerduty" |
142			"datadog" |
143			"nats" |
144			"zulip" |
145			"otel"
146
147		// Username specifies the name under which events are posted.
148		username?: strings.MaxRunes(
149			2048,
150		)
151	}
152
153	_embeddedResource: {
154		apiVersion!: string
155		kind!:       string
156		metadata?:   {...}
157	}
158	apiVersion: "notification.toolkit.fluxcd.io/v1beta3"
159	kind:       "Provider"
160	metadata!: {
161		name!:      string
162		namespace!: string
163		labels?: [string]:      string
164		annotations?: [string]: string
165		...
166	}
167}