Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the observability v1alpha1 API group +kubebuilder:object:generate=true +groupName=observability.giantswarm.io
Index ¶
Constants ¶
const ( // Finalizer needs to follow the format "domain name, a forward slash and the name of the finalizer" // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers GrafanaOrganizationFinalizer = "observability.giantswarm.io/grafanaorganization" )
Variables ¶
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 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) 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 ¶
func (in *GrafanaOrganizationList) DeepCopy() *GrafanaOrganizationList
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 ¶
func (in *GrafanaOrganizationSpec) DeepCopy() *GrafanaOrganizationSpec
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"`
}
GrafanaOrganizationStatus defines the observed state of GrafanaOrganization
func (*GrafanaOrganizationStatus) DeepCopy ¶
func (in *GrafanaOrganizationStatus) DeepCopy() *GrafanaOrganizationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaOrganizationStatus.
func (*GrafanaOrganizationStatus) DeepCopyInto ¶
func (in *GrafanaOrganizationStatus) DeepCopyInto(out *GrafanaOrganizationStatus)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RBAC.
func (*RBAC) DeepCopyInto ¶
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