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
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(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, }, } )
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 ¶
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"` 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.