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

notification/v1beta3/Alert.cue raw

  1package v1beta3
  2
  3import "strings"
  4
  5// Alert is the Schema for the alerts API
  6#Alert: {
  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	// AlertSpec defines an alerting rule for events involving a list of objects.
 26	spec?: {
 27		// EventMetadata is an optional field for adding metadata to events dispatched by the
 28		// controller. This can be used for enhancing the context of the event. If a field
 29		// would override one already present on the original event as generated by the emitter,
 30		// then the override doesn't happen, i.e. the original value is preserved, and an info
 31		// log is printed.
 32		eventMetadata?: [string]: string
 33
 34		// EventSeverity specifies how to filter events based on severity.
 35		// If set to 'info' no events will be filtered.
 36		eventSeverity?: "info" | "error"
 37
 38		// EventSources specifies how to filter events based
 39		// on the involved object kind, name and namespace.
 40		eventSources!: [...{
 41			// API version of the referent
 42			apiVersion?: string
 43
 44			// Kind of the referent
 45			kind!: "Bucket" |
 46				"GitRepository" |
 47				"Kustomization" |
 48				"HelmRelease" |
 49				"HelmChart" |
 50				"HelmRepository" |
 51				"ImageRepository" |
 52				"ImagePolicy" |
 53				"ImageUpdateAutomation" |
 54				"OCIRepository" |
 55				"ArtifactGenerator" |
 56				"ExternalArtifact"
 57
 58			// MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
 59			// map is equivalent to an element of matchExpressions, whose key field is "key", the
 60			// operator is "In", and the values array contains only "value". The requirements are ANDed.
 61			// MatchLabels requires the name to be set to `*`.
 62			matchLabels?: [string]: string
 63
 64			// Name of the referent
 65			// If multiple resources are targeted `*` may be set.
 66			name!: strings.MaxRunes(
 67				253,
 68			) & strings.MinRunes(
 69				1,
 70			)
 71
 72			// Namespace of the referent
 73			namespace?: strings.MaxRunes(
 74				253,
 75			) & strings.MinRunes(
 76				1,
 77			)
 78		}]
 79
 80		// ExclusionList specifies a list of Golang regular expressions
 81		// to be used for excluding messages.
 82		exclusionList?: [...string]
 83
 84		// InclusionList specifies a list of Golang regular expressions
 85		// to be used for including messages.
 86		inclusionList?: [...string]
 87
 88		// ProviderRef specifies which Provider this Alert should use.
 89		providerRef!: {
 90			// Name of the referent.
 91			name!: string
 92		}
 93
 94		// Summary holds a short description of the impact and affected cluster.
 95		// Deprecated: Use EventMetadata instead.
 96		summary?: strings.MaxRunes(
 97			255,
 98		)
 99
100		// Suspend tells the controller to suspend subsequent
101		// events handling for this Alert.
102		suspend?: bool
103	}
104
105	_embeddedResource: {
106		apiVersion!: string
107		kind!:       string
108		metadata?:   {...}
109	}
110	apiVersion: "notification.toolkit.fluxcd.io/v1beta3"
111	kind:       "Alert"
112	metadata!: {
113		name!:      string
114		namespace!: string
115		labels?: [string]:      string
116		annotations?: [string]: string
117		...
118	}
119}