v1alpha1

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 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"

	// Condition types set on AgentCredentialStatus.
	AgentCredentialConditionReady         = "Ready"
	AgentCredentialConditionGatewaySynced = "GatewaySynced"
)

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}

	// 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 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 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 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