v1alpha1

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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

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

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
	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"`
}

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. It must be lowercase. +kubebuilder:validation:Pattern="^[a-z]*$" +kubebuilder:validation:MinLength=1 +kubebuilder:validation:MaxLength=63

Jump to

Keyboard shortcuts

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