v1alpha1

package
v0.78.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the observability v1alpha1 API group +kubebuilder:object:generate=true +groupName=observability.giantswarm.io

Index

Constants

View Source
const (
	// AgentCredentialFinalizer ensures gateway htpasswd is re-aggregated before
	// the credential disappears.
	AgentCredentialFinalizer = "observability.giantswarm.io/agentcredential" // nolint:gosec // G101: finalizer name, not a credential

	// Condition types set on AgentCredentialStatus.
	AgentCredentialConditionReady         = "Ready"
	AgentCredentialConditionGatewaySynced = "GatewaySynced"
)
View Source
const (
	// HeartbeatFinalizer ensures the external monitor is removed before the
	// resource disappears.
	HeartbeatFinalizer = "observability.giantswarm.io/heartbeat"

	// HeartbeatConditionReady is true once the provider holds a monitor matching
	// this spec.
	HeartbeatConditionReady = "Ready"
)
View Source
const (
	// LogExportFinalizer ensures the exporter configuration is re-rendered without
	// this export before the resource goes away. The rendered values cover every
	// LogExport at once, so a deletion that skipped this would leave the removed
	// export still configured.
	LogExportFinalizer = "observability.giantswarm.io/logexport"

	// LogExportConditionReady is true once the export pipeline is configured and
	// the exporter has accepted it.
	LogExportConditionReady = "Ready"
	// LogExportConditionExporterAvailable reports whether alloy-logexporter is
	// actually running on this installation. The app ships to every management
	// cluster in a disabled state, so a valid LogExport can exist while nothing is
	// there to act on it.
	LogExportConditionExporterAvailable = "ExporterAvailable"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "observability.giantswarm.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // nolint:staticcheck // SA1019: kubebuilder scaffolding, no replacement offered

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AgentCredential added in v0.68.0

type AgentCredential struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AgentCredentialSpec   `json:"spec,omitempty"`
	Status AgentCredentialStatus `json:"status,omitempty"`
}

AgentCredential represents a single basic-auth credential scoped to one telemetry agent and one observability backend. Its lifecycle is managed by the observability-operator.

func (*AgentCredential) DeepCopy added in v0.68.0

func (in *AgentCredential) DeepCopy() *AgentCredential

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCredential.

func (*AgentCredential) DeepCopyInto added in v0.68.0

func (in *AgentCredential) DeepCopyInto(out *AgentCredential)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentCredential) DeepCopyObject added in v0.68.0

func (in *AgentCredential) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentCredentialList added in v0.68.0

type AgentCredentialList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AgentCredential `json:"items"`
}

AgentCredentialList contains a list of AgentCredential.

func (*AgentCredentialList) DeepCopy added in v0.68.0

func (in *AgentCredentialList) DeepCopy() *AgentCredentialList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCredentialList.

func (*AgentCredentialList) DeepCopyInto added in v0.68.0

func (in *AgentCredentialList) DeepCopyInto(out *AgentCredentialList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentCredentialList) DeepCopyObject added in v0.68.0

func (in *AgentCredentialList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentCredentialSpec added in v0.68.0

type AgentCredentialSpec struct {
	// Backend is the observability backend this credential grants access to
	// (metrics → Mimir, logs → Loki, traces → Tempo). Drives which gateway's
	// htpasswd Secret this credential is aggregated into.
	Backend CredentialBackend `json:"backend"`

	// AgentName identifies the telemetry agent this credential belongs to.
	// Used as the basic-auth username in the generated Secret and htpasswd entry.
	// RFC 7617 forbids ':' in basic-auth usernames.
	// +kubebuilder:validation:Pattern="^[a-zA-Z0-9][a-zA-Z0-9_-]{0,252}$"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	AgentName string `json:"agentName"`

	// SecretName overrides the generated Secret name. Defaults to metadata.name.
	// Must be a valid DNS-1123 subdomain.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
	SecretName string `json:"secretName,omitempty"`
}

AgentCredentialSpec defines the desired state of an AgentCredential.

func (*AgentCredentialSpec) DeepCopy added in v0.68.0

func (in *AgentCredentialSpec) DeepCopy() *AgentCredentialSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCredentialSpec.

func (*AgentCredentialSpec) DeepCopyInto added in v0.68.0

func (in *AgentCredentialSpec) DeepCopyInto(out *AgentCredentialSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentCredentialStatus added in v0.68.0

type AgentCredentialStatus struct {
	// SecretRef points to the rendered Secret in the same namespace.
	// +optional
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`

	// Conditions represent the latest available observations of the credential's state.
	// Types: Ready (secret rendered), GatewaySynced (htpasswd aggregated).
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

AgentCredentialStatus defines the observed state of an AgentCredential.

func (*AgentCredentialStatus) DeepCopy added in v0.68.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentCredentialStatus.

func (*AgentCredentialStatus) DeepCopyInto added in v0.68.0

func (in *AgentCredentialStatus) DeepCopyInto(out *AgentCredentialStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CredentialBackend added in v0.68.0

type CredentialBackend string

CredentialBackend is the observability backend this credential grants access to. +kubebuilder:validation:Enum=metrics;logs;traces

const (
	CredentialBackendMetrics CredentialBackend = "metrics"
	CredentialBackendLogs    CredentialBackend = "logs"
	CredentialBackendTraces  CredentialBackend = "traces"
)

type CronitorProvider added in v0.78.0

type CronitorProvider struct {
	// CredentialsRef names a Secret holding the Cronitor API keys, with keys
	// managementKey and pingKey:
	//
	//   - managementKey authenticates monitor create, update and delete against
	//     the Cronitor monitor API.
	//   - pingKey is used to ping the monitor once, which is what associates it
	//     with an environment; Cronitor has no API field for that.
	//
	// Both are required. This is the contract between this resource and whatever
	// ships it -- the keys are read from a Secret rather than the operator's own
	// environment precisely so the monitor definition can be shipped by another
	// application.
	//
	// The Secret is read from THIS resource's namespace; cross-namespace
	// references are not possible.
	CredentialsRef corev1.LocalObjectReference `json:"credentialsRef"`

	// Key is the monitor's unique identifier in Cronitor. Defaults to metadata.name.
	//
	// Whatever pings this monitor must use the same key: it is the last path
	// segment of https://cronitor.link/p/<pingKey>/<key>. A mismatch is silent
	// until the grace period expires and the monitor pages.
	//
	// Uniqueness is NOT enforced. Two Heartbeat resources naming one key both
	// write the same monitor, last writer wins; status.monitorKey on each of them
	// is what makes that visible.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	// +kubebuilder:validation:Pattern="^[a-zA-Z0-9][a-zA-Z0-9._-]*$"
	Key string `json:"key,omitempty"`

	// Schedule is how often the monitor expects to be pinged, in Cronitor
	// schedule syntax: a cron expression or an interval phrase.
	// +kubebuilder:example="every 30 minutes"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=256
	Schedule string `json:"schedule"`

	// GraceSeconds is how long Cronitor waits past a missed ping before alerting.
	// +kubebuilder:validation:Minimum=0
	GraceSeconds int `json:"graceSeconds"`

	// RealertInterval is how often Cronitor re-notifies while the monitor stays
	// failed. Empty means it notifies once.
	// +optional
	// +kubebuilder:example="every 24 hours"
	// +kubebuilder:validation:MaxLength=256
	RealertInterval string `json:"realertInterval,omitempty"`

	// Notify lists the Cronitor notification lists alerted when the monitor
	// fails. These lists, and any integration behind them, exist only in the
	// Cronitor account -- this field references them by name and cannot create
	// them. Empty means Cronitor's account default.
	// +optional
	// +listType=atomic
	// +kubebuilder:validation:MaxItems=32
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=256
	Notify []string `json:"notify,omitempty"`

	// Tags are set on the monitor in Cronitor, for grouping and filtering there.
	//
	// Order is significant to the operator, not to Cronitor: the list is compared
	// as-is against the monitor's current tags to decide whether an update is
	// needed, so an unstable order causes a needless write on every reconcile.
	// +optional
	// +listType=atomic
	// +kubebuilder:validation:MaxItems=64
	// +kubebuilder:validation:items:MinLength=1
	// +kubebuilder:validation:items:MaxLength=256
	Tags []string `json:"tags,omitempty"`

	// Note is free text shown on the monitor in Cronitor and carried into its
	// alerts, which makes it the place to put a runbook link.
	// +optional
	// +kubebuilder:validation:MaxLength=2048
	Note string `json:"note,omitempty"`
}

CronitorProvider describes a Cronitor heartbeat monitor. Field names and values follow the Cronitor monitor API. +kubebuilder:validation:XValidation:rule="size(self.credentialsRef.name) != 0",message="spec.provider.cronitor.credentialsRef.name must not be empty"

func (*CronitorProvider) DeepCopy added in v0.78.0

func (in *CronitorProvider) DeepCopy() *CronitorProvider

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronitorProvider.

func (*CronitorProvider) DeepCopyInto added in v0.78.0

func (in *CronitorProvider) DeepCopyInto(out *CronitorProvider)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DataSource added in v0.9.0

type DataSource struct {
	// ID is the unique id of the data source.
	ID int64 `json:"ID"`

	// Name is the name of the data source.
	Name string `json:"name"`
}

DataSource defines the name and id for data sources.

func (*DataSource) DeepCopy added in v0.9.0

func (in *DataSource) DeepCopy() *DataSource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataSource.

func (*DataSource) DeepCopyInto added in v0.9.0

func (in *DataSource) DeepCopyInto(out *DataSource)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GrafanaOrganization

type GrafanaOrganization struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   GrafanaOrganizationSpec   `json:"spec,omitempty"`
	Status GrafanaOrganizationStatus `json:"status,omitempty"`
}

GrafanaOrganization is the Schema describing a Grafana organization. Its lifecycle is managed by the observability-operator.

func (*GrafanaOrganization) ConvertFrom added in v0.51.0

func (dst *GrafanaOrganization) ConvertFrom(srcRaw conversion.Hub) error

ConvertFrom converts from the Hub version (v1alpha2) to this version

func (*GrafanaOrganization) ConvertTo added in v0.51.0

func (src *GrafanaOrganization) ConvertTo(dstRaw conversion.Hub) error

ConvertTo converts this GrafanaOrganization to the Hub version (v1alpha2)

func (*GrafanaOrganization) DeepCopy

func (in *GrafanaOrganization) DeepCopy() *GrafanaOrganization

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaOrganization.

func (*GrafanaOrganization) DeepCopyInto

func (in *GrafanaOrganization) DeepCopyInto(out *GrafanaOrganization)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GrafanaOrganization) DeepCopyObject

func (in *GrafanaOrganization) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GrafanaOrganizationList

type GrafanaOrganizationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []GrafanaOrganization `json:"items"`
}

GrafanaOrganizationList contains a list of GrafanaOrganization

func (*GrafanaOrganizationList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaOrganizationList.

func (*GrafanaOrganizationList) DeepCopyInto

func (in *GrafanaOrganizationList) DeepCopyInto(out *GrafanaOrganizationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GrafanaOrganizationList) DeepCopyObject

func (in *GrafanaOrganizationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type GrafanaOrganizationSpec

type GrafanaOrganizationSpec struct {
	// DisplayName is the name displayed when viewing the organization in Grafana. It can be different from the actual org's name.
	// +kubebuilder:example="Giant Swarm"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:unique=true
	DisplayName string `json:"displayName"`

	// Access rules defines user permissions for interacting with the organization in Grafana.
	RBAC *RBAC `json:"rbac"`

	// Tenants is a list of tenants that are associated with the Grafana organization.
	// +kubebuilder:example={"giantswarm"}
	// +kube:validation:MinItems=1
	Tenants []TenantID `json:"tenants"`
}

GrafanaOrganizationSpec defines the desired state of GrafanaOrganization

func (*GrafanaOrganizationSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaOrganizationSpec.

func (*GrafanaOrganizationSpec) DeepCopyInto

func (in *GrafanaOrganizationSpec) DeepCopyInto(out *GrafanaOrganizationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GrafanaOrganizationStatus

type GrafanaOrganizationStatus struct {
	// OrgID is the actual organisation ID in grafana.
	// +optional
	OrgID int64 `json:"orgID"`

	// DataSources is a list of grafana data sources that are available to the Grafana organization.
	// +optional
	DataSources []DataSource `json:"dataSources"`

	// DisplayName records the last display name successfully applied to the Grafana
	// organization referenced by OrgID.
	// +optional
	DisplayName string `json:"displayName,omitempty"`
}

GrafanaOrganizationStatus defines the observed state of GrafanaOrganization

func (*GrafanaOrganizationStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaOrganizationStatus.

func (*GrafanaOrganizationStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Heartbeat added in v0.78.0

type Heartbeat struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   HeartbeatSpec   `json:"spec,omitempty"`
	Status HeartbeatStatus `json:"status,omitempty"`
}

Heartbeat declares a dead-man's-switch monitor in an external service: a monitor that expects to be pinged on a schedule and alerts when the pings stop.

The operator owns the monitor's definition, not the pings. Something else -- typically an Alertmanager route firing on an always-on alert -- has to do the pinging, and it has to address the monitor by the same key. The two halves are only connected by that string, so a mismatch produces a monitor that exists, is never pinged, and alerts once the grace period elapses.

Scope

This resource is namespaced so that the provider credentials it references stay next to it and are resolved by name only.

func (*Heartbeat) DeepCopy added in v0.78.0

func (in *Heartbeat) DeepCopy() *Heartbeat

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Heartbeat.

func (*Heartbeat) DeepCopyInto added in v0.78.0

func (in *Heartbeat) DeepCopyInto(out *Heartbeat)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Heartbeat) DeepCopyObject added in v0.78.0

func (in *Heartbeat) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HeartbeatList added in v0.78.0

type HeartbeatList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Heartbeat `json:"items"`
}

HeartbeatList contains a list of Heartbeat.

func (*HeartbeatList) DeepCopy added in v0.78.0

func (in *HeartbeatList) DeepCopy() *HeartbeatList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatList.

func (*HeartbeatList) DeepCopyInto added in v0.78.0

func (in *HeartbeatList) DeepCopyInto(out *HeartbeatList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HeartbeatList) DeepCopyObject added in v0.78.0

func (in *HeartbeatList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HeartbeatProvider added in v0.78.0

type HeartbeatProvider struct {
	// Type selects the provider variant.
	Type HeartbeatProviderType `json:"type"`

	// Cronitor configures a Cronitor heartbeat monitor. Required when type is "cronitor".
	// +optional
	Cronitor *CronitorProvider `json:"cronitor,omitempty"`
}

HeartbeatProvider is a discriminated union: exactly the variant named by Type must be set.

Every field of a variant is that provider's own vocabulary -- there is no neutral heartbeat vocabulary underneath -- so supporting another service means adding a variant here rather than widening a flat spec. +kubebuilder:validation:XValidation:rule="self.type != 'cronitor' || has(self.cronitor)",message="spec.provider.cronitor is required when type is 'cronitor'" +kubebuilder:validation:XValidation:rule="self.type == 'cronitor' || !has(self.cronitor)",message="spec.provider.cronitor may only be set when type is 'cronitor'"

func (*HeartbeatProvider) DeepCopy added in v0.78.0

func (in *HeartbeatProvider) DeepCopy() *HeartbeatProvider

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatProvider.

func (*HeartbeatProvider) DeepCopyInto added in v0.78.0

func (in *HeartbeatProvider) DeepCopyInto(out *HeartbeatProvider)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeartbeatProviderType added in v0.78.0

type HeartbeatProviderType string

HeartbeatProviderType selects which provider variant is in use. +kubebuilder:validation:Enum=cronitor

const (
	// HeartbeatProviderCronitor manages a heartbeat monitor in Cronitor.
	HeartbeatProviderCronitor HeartbeatProviderType = "cronitor"
)

type HeartbeatSpec added in v0.78.0

type HeartbeatSpec struct {
	// Provider is the external service the monitor is created in.
	Provider HeartbeatProvider `json:"provider"`
}

HeartbeatSpec defines the desired state of Heartbeat.

func (*HeartbeatSpec) DeepCopy added in v0.78.0

func (in *HeartbeatSpec) DeepCopy() *HeartbeatSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatSpec.

func (*HeartbeatSpec) DeepCopyInto added in v0.78.0

func (in *HeartbeatSpec) DeepCopyInto(out *HeartbeatSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeartbeatStatus added in v0.78.0

type HeartbeatStatus struct {
	// ObservedGeneration is the .metadata.generation this status was set from.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// MonitorKey is the key of the monitor this resource last wrote.
	//
	// Keys are not unique across resources by design, so this reports what was
	// actually written rather than what was asked for. Listing it across
	// namespaces is how a collision between two Heartbeat resources is spotted.
	// +optional
	// +kubebuilder:validation:MaxLength=253
	MonitorKey string `json:"monitorKey,omitempty"`

	// Conditions represent the latest available observations of the heartbeat's state.
	// Types: Ready (the provider holds a monitor matching this spec).
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

HeartbeatStatus defines the observed state of Heartbeat.

func (*HeartbeatStatus) DeepCopy added in v0.78.0

func (in *HeartbeatStatus) DeepCopy() *HeartbeatStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatStatus.

func (*HeartbeatStatus) DeepCopyInto added in v0.78.0

func (in *HeartbeatStatus) DeepCopyInto(out *HeartbeatStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogExport added in v0.73.0

type LogExport struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LogExportSpec   `json:"spec,omitempty"`
	Status LogExportStatus `json:"status,omitempty"`
}

LogExport continuously copies a selection of the installation's logs to a destination outside the observability platform, for archival or for delivery to a system Giant Swarm does not run.

Logs are teed off the write path, so an export can never slow down or break log ingestion. The same property makes delivery best-effort: if the exporter is unavailable, lines are dropped rather than queued, and there is no backfill.

Scope

This resource is namespaced so that credentials stay next to it, but the namespace is NOT a data boundary: a LogExport in any namespace can select logs from every cluster on the installation. Permission to create one should be treated as privileged access to log data.

func (*LogExport) DeepCopy added in v0.73.0

func (in *LogExport) DeepCopy() *LogExport

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogExport.

func (*LogExport) DeepCopyInto added in v0.73.0

func (in *LogExport) DeepCopyInto(out *LogExport)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LogExport) DeepCopyObject added in v0.73.0

func (in *LogExport) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LogExportDestination added in v0.73.0

type LogExportDestination struct {
	// Type selects the destination variant.
	Type LogExportDestinationType `json:"type"`

	// S3 configures an S3 or S3-compatible bucket. Required when type is "s3".
	// +optional
	S3 *S3Destination `json:"s3,omitempty"`

	// Loki configures a Loki-compatible push endpoint. Required when type is "loki".
	// +optional
	Loki *LokiDestination `json:"loki,omitempty"`
}

LogExportDestination is a discriminated union: exactly the variant named by Type must be set.

Adding support for a new kind of sink means adding a variant here, which keeps the API open-ended without accepting arbitrary agent configuration. +kubebuilder:validation:XValidation:rule="self.type != 's3' || has(self.s3)",message="spec.destination.s3 is required when type is 's3'" +kubebuilder:validation:XValidation:rule="self.type != 'loki' || has(self.loki)",message="spec.destination.loki is required when type is 'loki'" +kubebuilder:validation:XValidation:rule="self.type == 's3' || !has(self.s3)",message="spec.destination.s3 may only be set when type is 's3'" +kubebuilder:validation:XValidation:rule="self.type == 'loki' || !has(self.loki)",message="spec.destination.loki may only be set when type is 'loki'"

func (*LogExportDestination) DeepCopy added in v0.73.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogExportDestination.

func (*LogExportDestination) DeepCopyInto added in v0.73.0

func (in *LogExportDestination) DeepCopyInto(out *LogExportDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogExportDestinationType added in v0.73.0

type LogExportDestinationType string

LogExportDestinationType selects which destination variant is in use. +kubebuilder:validation:Enum=s3;loki

const (
	// LogExportDestinationS3 writes objects to an S3 or S3-compatible bucket.
	LogExportDestinationS3 LogExportDestinationType = "s3"
	// LogExportDestinationLoki pushes to a Loki-compatible endpoint.
	LogExportDestinationLoki LogExportDestinationType = "loki"
)

type LogExportList added in v0.73.0

type LogExportList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LogExport `json:"items"`
}

LogExportList contains a list of LogExport.

func (*LogExportList) DeepCopy added in v0.73.0

func (in *LogExportList) DeepCopy() *LogExportList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogExportList.

func (*LogExportList) DeepCopyInto added in v0.73.0

func (in *LogExportList) DeepCopyInto(out *LogExportList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LogExportList) DeepCopyObject added in v0.73.0

func (in *LogExportList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LogExportSpec added in v0.73.0

type LogExportSpec struct {
	// Selector chooses which log lines are exported, using LogQL syntax.
	//
	// Only a subset the exporter can render is accepted: a stream selector, optional
	// line filters, an optional "| json", and optional label filters comparing a single
	// label to a string. Aggregations and time ranges are rejected -- an export is a
	// continuous tee, not a query, so it has no start or end.
	//
	// As in Loki, the stream selector must name at least one label it can match on, so
	// {job=~".*"} is rejected while {job=~".+"} is accepted.
	//
	// The same expression can be pasted into Grafana Explore to see exactly which
	// lines it matches before committing it.
	//
	// This is NOT limited by the namespace of this resource: a selector matches
	// against every log line arriving at the installation's write path, from any
	// cluster. See the LogExport type documentation.
	// +kubebuilder:example="{scrape_job=\"audit-logs\"}"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=4096
	Selector string `json:"selector"`

	// Destination is where the selected lines are written.
	Destination LogExportDestination `json:"destination"`
}

LogExportSpec defines the desired state of LogExport.

func (*LogExportSpec) DeepCopy added in v0.73.0

func (in *LogExportSpec) DeepCopy() *LogExportSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogExportSpec.

func (*LogExportSpec) DeepCopyInto added in v0.73.0

func (in *LogExportSpec) DeepCopyInto(out *LogExportSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LogExportStatus added in v0.73.0

type LogExportStatus struct {
	// ObservedGeneration is the .metadata.generation this status was set from.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Conditions represent the latest available observations of the export's state.
	// Types: Ready (the pipeline is configured), ExporterAvailable (alloy-logexporter
	// is running on this installation).
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

LogExportStatus defines the observed state of LogExport.

func (*LogExportStatus) DeepCopy added in v0.73.0

func (in *LogExportStatus) DeepCopy() *LogExportStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogExportStatus.

func (*LogExportStatus) DeepCopyInto added in v0.73.0

func (in *LogExportStatus) DeepCopyInto(out *LogExportStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LokiDestination added in v0.73.0

type LokiDestination struct {
	// URL is the push endpoint, including the path.
	// +kubebuilder:example="https://logs.example.com/loki/api/v1/push"
	// +kubebuilder:validation:Pattern="^https?://.+$"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=2048
	URL string `json:"url"`

	// TenantID is sent as the X-Scope-OrgID header. Required by multi-tenant Loki
	// deployments, ignored by single-tenant ones.
	// +optional
	// +kubebuilder:validation:MaxLength=150
	TenantID string `json:"tenantID,omitempty"`

	// CredentialsRef names a Secret holding basic-auth credentials, with keys
	// username and password.
	//
	// The Secret is read from THIS resource's namespace; cross-namespace
	// references are not possible.
	// +optional
	CredentialsRef *corev1.LocalObjectReference `json:"credentialsRef,omitempty"`
}

LokiDestination pushes to a Loki-compatible endpoint.

func (*LokiDestination) DeepCopy added in v0.73.0

func (in *LokiDestination) DeepCopy() *LokiDestination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LokiDestination.

func (*LokiDestination) DeepCopyInto added in v0.73.0

func (in *LokiDestination) DeepCopyInto(out *LokiDestination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RBAC

type RBAC struct {
	// Admins is a list of user organizations that have admin access to the grafanaorganization.
	Admins []string `json:"admins"`

	// Editors is a list of user organizations that have editor access to the grafanaorganization.
	// +optional
	Editors []string `json:"editors"`

	// Viewers is a list of user organizations that have viewer access to the grafanaorganization.
	// +optional
	Viewers []string `json:"viewers"`
}

RBAC defines the RoleBasedAccessControl configuration for the Grafana organization. Each fields represents the mapping to a Grafana role:

Admin: full access to the Grafana organization
Editor: edit resources in the Grafana organization
Viewer: read only access to the Grafana organization

Each fields holds a list of string which represents values for a specific auth provider org attribute. The org attribute is looked up using the `org_attribute_path` which is configured on your Grafana instance, see `https://<YOUR_GRAFANA_INSTANCE>/admin/settings`. A user is granted a role when one of its org attribute value is contained within one of the role's values defined here. More info on Grafana org attribute and role mapping at [Configure role mapping](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/generic-oauth/#configure-role-mapping)

func (*RBAC) DeepCopy

func (in *RBAC) DeepCopy() *RBAC

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBAC.

func (*RBAC) DeepCopyInto

func (in *RBAC) DeepCopyInto(out *RBAC)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type S3Destination added in v0.73.0

type S3Destination struct {
	// Bucket is the destination bucket name.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	Bucket string `json:"bucket"`

	// Region is the bucket's region.
	// +kubebuilder:example="eu-west-2"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=63
	Region string `json:"region"`

	// Prefix is the key prefix objects are written under. Object keys are
	// <prefix>/year=…/month=…/day=…/hour=…/minute=…/logs_<uuidv7>.txt.gz, using the
	// time the object was uploaded rather than the time of the events in it.
	// +optional
	// +kubebuilder:example="giantswarm/audit"
	// +kubebuilder:validation:MaxLength=512
	Prefix string `json:"prefix,omitempty"`

	// Endpoint overrides the S3 endpoint. Leave empty for AWS; set it to target an
	// S3-compatible store.
	// +optional
	// +kubebuilder:validation:MaxLength=2048
	Endpoint string `json:"endpoint,omitempty"`

	// ForcePathStyle addresses the bucket as a path rather than a subdomain.
	// S3-compatible stores generally require this; AWS generally does not.
	// +optional
	ForcePathStyle bool `json:"forcePathStyle,omitempty"`

	// RoleARN is an IAM role to assume before writing, for cross-account delivery.
	// When set, CredentialsRef is usually unnecessary: the exporter authenticates
	// with its own ServiceAccount identity and assumes this role.
	// +optional
	// +kubebuilder:validation:Pattern="^$|^arn:aws[a-zA-Z-]*:iam::[0-9]{12}:role/.+$"
	// +kubebuilder:validation:MaxLength=2048
	RoleARN string `json:"roleARN,omitempty"`

	// Format selects how each record is written into AWS S3 object storage.
	//
	// "otlp" wraps each batch in an OTLP document, keeping the labels as record attributes.
	// "raw" writes the log lines alone, newline-delimited and unaltered: smaller and
	// directly queryable, but with no labels and so no way to tell which cluster or pod a
	// line came from.
	// +optional
	// +kubebuilder:default=otlp
	Format S3Format `json:"format,omitempty"`

	// CredentialsRef names a Secret holding static credentials, with keys
	// AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
	//
	// The Secret is read from THIS resource's namespace; cross-namespace
	// references are not possible. Omit it to authenticate by workload identity
	// (IRSA) instead, optionally combined with RoleARN.
	// +optional
	CredentialsRef *corev1.LocalObjectReference `json:"credentialsRef,omitempty"`
}

S3Destination writes objects to a bucket.

func (*S3Destination) DeepCopy added in v0.73.0

func (in *S3Destination) DeepCopy() *S3Destination

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Destination.

func (*S3Destination) DeepCopyInto added in v0.73.0

func (in *S3Destination) DeepCopyInto(out *S3Destination)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type S3Format added in v0.76.0

type S3Format string

S3Format selects how each record is written into an object. +kubebuilder:validation:Enum=raw;otlp

const (
	S3FormatRaw  S3Format = "raw"
	S3FormatOTLP S3Format = "otlp"
)

type TenantID added in v0.10.0

type TenantID string

TenantID is a unique identifier for a tenant. Must follow both Grafana Mimir tenant ID restrictions and Alloy component naming restrictions. See: https://grafana.com/docs/mimir/latest/configure/about-tenant-ids/ See: https://grafana.com/docs/alloy/latest/get-started/configuration-syntax/syntax/#identifiers Allowed characters: alphanumeric (a-z, A-Z, 0-9) and underscore (_) Must start with a letter or underscore, max 150 characters (Mimir tenant limit) Forbidden value: "__mimir_cluster" (enforced by validating webhook) +kubebuilder:validation:Pattern="^[a-zA-Z_][a-zA-Z0-9_]{0,149}$" +kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=150

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL