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 DataSourceType
- type Dex
- type Grafana
- func (in *Grafana) DeepCopy() *Grafana
- func (in *Grafana) DeepCopyInto(out *Grafana)
- func (in *Grafana) DeepCopyObject() runtime.Object
- 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 GrafooCustomDefaulter
- 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 = config.DexImage GrafanaVersion = config.GrafanaVersion TokenDuration = metav1.Duration{Duration: 1440 * time.Minute} GrafanaReplicas = int32(2) DexHttpPort = int32(5555) DexGrpcPort = int32(5556) DexMetricsPort = int32(5557) MariaDBStorageSize = "5Gi" MariaDBImage = config.MariaDBImage 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 { // Name is the name of the DataSource // +kubebuilder:validation:Required Name string `json:"name,omitempty"` // +required // +kubebuilder:validation:Required // +operator-sdk:csv:customresourcedefinitions:type=spec,xDescriptors={"urn:alm:descriptor:com.tectonic.ui:select:tempo-incluster","urn:alm:descriptor:com.tectonic.ui:select:loki-incluster","urn:alm:descriptor:com.tectonic.ui:select:prometheus-incluster"},displayName="DataSource type" Type DataSourceType `json:"type,omitempty"` // +kubebuilder:validation:Required Enabled bool `json:"enabled,omitempty"` // Loki is the configuration for the Loki DataSource // +kubebuilder:validation:Optional Loki *LokiDS `json:"loki,omitempty"` // Tempo is the configuration for the Tempo DataSource // +kubebuilder:validation:Optional Tempo *TempoDS `json:"tempo,omitempty"` // Prometheus is the configuration for the Prometheus DataSource // +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 DataSourceType ¶ added in v0.1.2
type DataSourceType string
DataSourceType defines the type of the data source
+kubebuilder:validation:Enum=prometheus-incluster;loki-incluster;tempo-incluster
const ( // PrometheusInCluster is the Prometheus data source type PrometheusInCluster DataSourceType = "prometheus-incluster" // LokiInCluster is the Loki data source type LokiInCluster DataSourceType = "loki-incluster" // TempoInCluster is the Tempo data source type TempoInCluster DataSourceType = "tempo-incluster" )
type Dex ¶
type Dex struct { // Enabled is a flag to enable or disable the Dex OIDC provider // +kubebuilder:validation:Required Enabled bool `json:"enabled,omitempty"` // Image is the image to use for the Dex OIDC provider // +kubebuilder:validation:Optional Image string `json:"image,omitempty"` }
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 +kubebuilder:subresource:status
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) 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 { // Version is the version of Grafana to deploy // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+){0,2})$" // +kubebuilder:default="9.5.17" Version string `json:"version,omitempty"` // Replicas is the number of replicas for the Grafana deployment // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=10 // +kubebuilder:default=2 Replicas *int32 `json:"replicas,omitempty"` // TokenDuration is the duration of the token used for authentication // The token is used to authenticate for Dex and for the DataSources // +kubebuilder:validation:Optional // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" // +kubebuilder:default="1440m" TokenDuration *metav1.Duration `json:"tokenDuration,omitempty"` // 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>. // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern=`^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$` IngressDomain string `json:"domain,omitempty"` // Dex is the configuration for the Dex OIDC provider // +kubebuilder:validation:Optional Dex *Dex `json:"dex,omitempty"` // MariaDB is the configuration for the MariaDB database // +kubebuilder:validation:Optional MariaDB *MariaDB `json:"mariadb,omitempty"` // DataSources is the configuration for the DataSources // +kubebuilder:validation:Optional 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 // +operator-sdk:csv:customresourcedefinitions:displayName="Token expiration time" TokenExpirationTime *metav1.Time `json:"tokenExpirationTime,omitempty"` Phase string `json:"phase,omitempty"` // +operator-sdk:csv:customresourcedefinitions:type=status Conditions []metav1.Condition `json:"conditions"` }
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 GrafooCustomDefaulter ¶ added in v0.1.2
type GrafooCustomDefaulter struct { }
func (*GrafooCustomDefaulter) DeepCopy ¶ added in v0.1.2
func (in *GrafooCustomDefaulter) DeepCopy() *GrafooCustomDefaulter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafooCustomDefaulter.
func (*GrafooCustomDefaulter) DeepCopyInto ¶ added in v0.1.2
func (in *GrafooCustomDefaulter) DeepCopyInto(out *GrafooCustomDefaulter)
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 { // URL is the URL for the Loki DataSource // +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 { // Name is the name of the Loki Stack // +kubebuilder:validation:Optional Name string `json:"name,omitempty"` // Namespace is the namespace of the Loki Stack // +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 { // Enabled is a flag to enable or disable the MariaDB database // +kubebuilder:validation:Required Enabled bool `json:"enabled,omitempty"` // StorageSize is the size of the storage for the MariaDB database // +kubebuilder:validation:Optional StorageSize string `json:"storageSize,omitempty"` // Image is the image to use for the MariaDB database // +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 { // URL is the URL for the Prometheus DataSource // +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 { // URL is the URL for the Tempo DataSource // +kubebuilder:validation:Optional URL string `json:"url,omitempty"` // TempoStack is the configuration for the Tempo Stack // +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 { // Name is the name of the Tempo Stack // +kubebuilder:validation:Optional Name string `json:"name,omitempty"` // Namespace is the namespace of the Tempo Stack // +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.