v1alpha1

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the grafoo v1alpha1 API group +kubebuilder:object:generate=true +groupName=grafoo.cloudmonkey.org

Index

Constants

View Source
const (
	// Phases
	PhasePending   = "Pending"
	PhaseRunning   = "Running"
	PhaseSucceeded = "Succeeded"
	PhaseFailed    = "Failed"
)

Variables

View Source
var (
	DexImage        = "docker.io/dexidp/dex:v2.39.1-distroless"
	GrafanaVersion  = "9.5.17"
	TokenDuration   = metav1.Duration{Duration: 1440 * time.Minute}
	GrafanaReplicas = int32(1)
	DexHttpPort     = int32(5555)
	DexGrpcPort     = int32(5556)
	DexMetricsPort  = int32(5557)
	DataSources     = []DataSource{
		{
			Name:    "Prometheus",
			Type:    "prometheus-incluster",
			URL:     "https://thanos-querier.openshift-monitoring.svc.cluster.local:9091",
			Enabled: true,
		},
		{
			Name:    "Loki (Application)",
			Type:    "loki-incluster",
			URL:     "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/application/",
			Enabled: true,
		},
		{
			Name:    "Loki (Infrastructure)",
			Type:    "loki-incluster",
			URL:     "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/infrastructure/",
			Enabled: true,
		},
		{
			Name:    "Loki (Audit)",
			Type:    "loki-incluster",
			URL:     "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/audit/",
			Enabled: true,
		},
	}
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "grafoo.cloudmonkey.org", 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

type DataSource struct {
	// +kubebuilder:validation:Optional
	Name string `json:"name,omitempty"`
	// +kubebuilder:validation:Enum=prometheus-incluster;loki-incluster;tempo-incluster
	Type    string `json:"type,omitempty"`
	URL     string `json:"url,omitempty"`
	Enabled bool   `json:"enabled,omitempty"`
}

func (*DataSource) DeepCopy

func (in *DataSource) DeepCopy() *DataSource

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

func (*DataSource) DeepCopyInto

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

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

func (*DataSource) GetDataSourceNameHash

func (ds *DataSource) GetDataSourceNameHash() string

type Dex

type Dex struct {
	Enabled bool   `json:"enabled,omitempty"`
	Image   string `json:"image,omitempty"`
}

func (*Dex) DeepCopy

func (in *Dex) DeepCopy() *Dex

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

func (*Dex) DeepCopyInto

func (in *Dex) DeepCopyInto(out *Dex)

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

type Grafana

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

	Spec   GrafanaSpec   `json:"spec,omitempty"`
	Status GrafanaStatus `json:"status,omitempty"`
}

Grafana is the Schema for the grafanas API

func (*Grafana) DeepCopy

func (in *Grafana) DeepCopy() *Grafana

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

func (*Grafana) DeepCopyInto

func (in *Grafana) DeepCopyInto(out *Grafana)

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

func (*Grafana) DeepCopyObject

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

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

func (*Grafana) Default

func (r *Grafana) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Grafana) SetupWebhookWithManager

func (r *Grafana) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Grafana) ValidateCreate

func (r *Grafana) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Grafana) ValidateDelete

func (r *Grafana) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Grafana) ValidateUpdate

func (r *Grafana) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type GrafanaList

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

GrafanaList contains a list of Grafana

func (*GrafanaList) DeepCopy

func (in *GrafanaList) DeepCopy() *GrafanaList

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

func (*GrafanaList) DeepCopyInto

func (in *GrafanaList) DeepCopyInto(out *GrafanaList)

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

func (*GrafanaList) DeepCopyObject

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

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

type GrafanaSpec

type GrafanaSpec struct {
	// +kubebuilder:validation:Optional
	Version string `json:"version,omitempty"`
	// +kubebuilder:validation:Optional
	Replicas *int32 `json:"replicas,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(s|m|h))+$"
	// +kubebuilder:default="1440m0s"
	TokenDuration metav1.Duration `json:"tokenDuration,omitempty"`
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:Pattern=`^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$`
	// IngressDomain is the domain to use for the Grafana Ingress, setting a domain will create an Ingress for Grafana and Dex as grafana.<IngressDomain> and dex.<IngressDomain>.
	IngressDomain string       `json:"domain,omitempty"`
	Dex           *Dex         `json:"dex,omitempty"`
	DataSources   []DataSource `json:"datasources,omitempty"`
}

GrafanaSpec defines the desired state of Grafana

func (*GrafanaSpec) DeepCopy

func (in *GrafanaSpec) DeepCopy() *GrafanaSpec

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

func (*GrafanaSpec) DeepCopyInto

func (in *GrafanaSpec) DeepCopyInto(out *GrafanaSpec)

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

type GrafanaStatus

type GrafanaStatus struct {
	// TokenExpirationTime is the time when the token will expire
	// +optional
	TokenExpirationTime *metav1.Time `json:"tokenExpirationTime,omitempty"`
	Phase               string       `json:"phase,omitempty"`
}

GrafanaStatus defines the observed state of Grafana

func (*GrafanaStatus) DeepCopy

func (in *GrafanaStatus) DeepCopy() *GrafanaStatus

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

func (*GrafanaStatus) DeepCopyInto

func (in *GrafanaStatus) DeepCopyInto(out *GrafanaStatus)

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

Jump to

Keyboard shortcuts

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