Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the grafoo v1alpha1 API group +kubebuilder:object:generate=true +groupName=grafoo.cloudmonkey.org
Index ¶
- Constants
- Variables
- type DataSource
- type Dex
- type Grafana
- func (in *Grafana) DeepCopy() *Grafana
- func (in *Grafana) DeepCopyInto(out *Grafana)
- func (in *Grafana) DeepCopyObject() runtime.Object
- func (r *Grafana) Default()
- func (r *Grafana) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Grafana) ValidateCreate() (admission.Warnings, error)
- func (r *Grafana) ValidateDelete() (admission.Warnings, error)
- func (r *Grafana) ValidateUpdate(old runtime.Object) (admission.Warnings, error)
- type GrafanaList
- type GrafanaSpec
- type GrafanaStatus
- type LokiDS
- type LokiStack
- type MariaDB
- type PrometheusDS
- type TempoDS
- type TempoStack
Constants ¶
const ( // Phases PhasePending = "Pending" PhaseRunning = "Running" PhaseSucceeded = "Succeeded" PhaseFailed = "Failed" )
Variables ¶
var ( DexImage = "docker.io/dexidp/dex:v2.39.1-distroless" GrafanaVersion = "9.5.17" TokenDuration = metav1.Duration{Duration: 1440 * time.Minute} GrafanaReplicas = int32(2) DexHttpPort = int32(5555) DexGrpcPort = int32(5556) DexMetricsPort = int32(5557) MariaDBStorageSize = "5Gi" MariaDBImage = "registry.access.redhat.com/rhel9/mariadb-1011:1-12" DataSources = []DataSource{ { Name: "Prometheus", Type: "prometheus-incluster", Enabled: true, Prometheus: &PrometheusDS{ URL: "https://thanos-querier.openshift-monitoring.svc.cluster.local:9091", }, }, { Name: "Loki (Application)", Type: "loki-incluster", Enabled: true, Loki: &LokiDS{ URL: "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/application/", }, }, { Name: "Loki (Infrastructure)", Type: "loki-incluster", Enabled: true, Loki: &LokiDS{ URL: "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/infrastructure/", }, }, { Name: "Loki (Audit)", Type: "loki-incluster", Enabled: true, Loki: &LokiDS{ URL: "https://logging-loki-gateway-http.openshift-logging.svc.cluster.local:8080/api/logs/v1/audit/", }, }, { Name: "Tempo (Dev)", Type: "tempo-incluster", Enabled: true, Tempo: &TempoDS{ URL: "https://tempo-tempo-gateway.openshift-tempo-operator.svc.cluster.local:8080/api/traces/v1/dev/tempo", }, }, { Name: "Tempo (Prod)", Type: "tempo-incluster", Enabled: true, Tempo: &TempoDS{ URL: "https://tempo-tempo-gateway.openshift-tempo-operator.svc.cluster.local:8080/api/traces/v1/prod/tempo", }, }, } )
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:Required
Name string `json:"name,omitempty"`
// +kubebuilder:validation:Required
// +kubebuilder:validation:Enum=prometheus-incluster;loki-incluster;tempo-incluster
Type string `json:"type,omitempty"`
// +kubebuilder:validation:Required
Enabled bool `json:"enabled,omitempty"`
// +kubebuilder:validation:Optional
Loki *LokiDS `json:"loki,omitempty"`
// +kubebuilder:validation:Optional
Tempo *TempoDS `json:"tempo,omitempty"`
// +kubebuilder:validation:Optional
Prometheus *PrometheusDS `json:"prometheus,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 ¶
func (*Dex) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dex.
func (*Dex) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Grafana.
func (*Grafana) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Grafana) DeepCopyObject ¶
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 (*Grafana) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Grafana) ValidateDelete ¶
ValidateDelete 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"`
// +kubebuilder:validation:Optional
Dex *Dex `json:"dex,omitempty"`
// +kubebuilder:validation:Optional
MariaDB *MariaDB `json:"mariadb,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.
type LokiDS ¶ added in v0.1.1
type LokiDS struct {
// +kubebuilder:validation:Optional
URL string `json:"url,omitempty"`
// +kubebuilder:validation:Optional
LokiStack *LokiStack `json:"lokiStack,omitempty"`
}
func (*LokiDS) DeepCopy ¶ added in v0.1.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LokiDS.
func (*LokiDS) DeepCopyInto ¶ added in v0.1.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LokiStack ¶ added in v0.1.1
type LokiStack struct {
// +kubebuilder:validation:Optional
Name string `json:"name,omitempty"`
// +kubebuilder:validation:Optional
Namespace string `json:"namespace,omitempty"`
}
func (*LokiStack) DeepCopy ¶ added in v0.1.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LokiStack.
func (*LokiStack) DeepCopyInto ¶ added in v0.1.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MariaDB ¶ added in v0.1.1
type MariaDB struct {
// +kubebuilder:validation:Optional
Enabled bool `json:"enabled,omitempty"`
// +kubebuilder:validation:Optional
StorageSize string `json:"storageSize,omitempty"`
// +kubebuilder:validation:Optional
Image string `json:"image,omitempty"`
}
func (*MariaDB) DeepCopy ¶ added in v0.1.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MariaDB.
func (*MariaDB) DeepCopyInto ¶ added in v0.1.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusDS ¶ added in v0.1.1
type PrometheusDS struct {
// +kubebuilder:validation:Required
URL string `json:"url,omitempty"`
}
func (*PrometheusDS) DeepCopy ¶ added in v0.1.1
func (in *PrometheusDS) DeepCopy() *PrometheusDS
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusDS.
func (*PrometheusDS) DeepCopyInto ¶ added in v0.1.1
func (in *PrometheusDS) DeepCopyInto(out *PrometheusDS)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TempoDS ¶ added in v0.1.1
type TempoDS struct {
// +kubebuilder:validation:Optional
URL string `json:"url,omitempty"`
// +kubebuilder:validation:Optional
TempoStack *TempoStack `json:"tempoStack,omitempty"`
}
func (*TempoDS) DeepCopy ¶ added in v0.1.1
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TempoDS.
func (*TempoDS) DeepCopyInto ¶ added in v0.1.1
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TempoStack ¶ added in v0.1.1
type TempoStack struct {
// +kubebuilder:validation:Optional
Name string `json:"name,omitempty"`
// +kubebuilder:validation:Optional
Namespace string `json:"namespace,omitempty"`
}
func (*TempoStack) DeepCopy ¶ added in v0.1.1
func (in *TempoStack) DeepCopy() *TempoStack
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TempoStack.
func (*TempoStack) DeepCopyInto ¶ added in v0.1.1
func (in *TempoStack) DeepCopyInto(out *TempoStack)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.