v1alpha1

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the rhobs v1alpha1 API group +kubebuilder:object:generate=true +groupName=monitoring.rhobs

Index

Constants

View Source
const (
	ConditionTrue    ConditionStatus = "True"
	ConditionFalse   ConditionStatus = "False"
	ConditionUnknown ConditionStatus = "Unknown"

	ReconciledCondition        ConditionType = "Reconciled"
	AvailableCondition         ConditionType = "Available"
	ResourceDiscoveryCondition ConditionType = "ResourceDiscovery"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "monitoring.rhobs", 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 AlertmanagerConfig

type AlertmanagerConfig struct {
	// Disables the deployment of Alertmanager.
	// +optional
	// +kubebuilder:default=false
	Disabled bool `json:"disabled,omitempty"`
	// Configure TLS options for the Alertmanager web server.
	// +optional
	WebTLSConfig *WebTLSConfig `json:"webTLSConfig,omitempty"`
}

func (*AlertmanagerConfig) DeepCopy

func (in *AlertmanagerConfig) DeepCopy() *AlertmanagerConfig

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

func (*AlertmanagerConfig) DeepCopyInto

func (in *AlertmanagerConfig) DeepCopyInto(out *AlertmanagerConfig)

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

type Condition

type Condition struct {
	// type of condition in CamelCase or in foo.example.com/CamelCase.
	// The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
	Type ConditionType `json:"type"`
	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	// +optional
	// +kubebuilder:validation:Minimum=0
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
	// reason contains a programmatic identifier indicating the reason for the condition's last transition.
	// Producers of specific condition types may define expected values and meanings for this field,
	// and whether the values are considered a guaranteed API.
	// The value should be a CamelCase string.
	// This field may not be empty.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Pattern=`^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$`
	Reason string `json:"reason"`
	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=32768
	Message string `json:"message"`
	// status of the condition
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=True;False;Unknown;Degraded
	Status ConditionStatus `json:"status"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

func (Condition) Equal

func (c Condition) Equal(n Condition) bool

type ConditionStatus

type ConditionStatus string

type ConditionType

type ConditionType string

+required +kubebuilder:validation:Required +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` +kubebuilder:validation:MaxLength=316

type LogLevel

type LogLevel string

Loglevel set log levels of configured components +kubebuilder:validation:Enum=debug;info;warn;error

const (
	// Debug Log level
	Debug LogLevel = "debug"

	// Info Log level
	Info LogLevel = "info"

	// Warn Log level
	Warn LogLevel = "warn"

	// Error Log level
	Error LogLevel = "error"
)

type MonitoringStack

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

	Spec   MonitoringStackSpec   `json:"spec,omitempty"`
	Status MonitoringStackStatus `json:"status,omitempty"`
}

MonitoringStack is the Schema for the monitoringstacks API +k8s:openapi-gen=true +kubebuilder:resource +kubebuilder:subresource:status +kubebuilder:metadata:annotations="observability.openshift.io/api-support=TechPreview"

func (*MonitoringStack) DeepCopy

func (in *MonitoringStack) DeepCopy() *MonitoringStack

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

func (*MonitoringStack) DeepCopyInto

func (in *MonitoringStack) DeepCopyInto(out *MonitoringStack)

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

func (*MonitoringStack) DeepCopyObject

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

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

type MonitoringStackList

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

MonitoringStackList contains a list of MonitoringStack +kubebuilder:resource +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MonitoringStackList) DeepCopy

func (in *MonitoringStackList) DeepCopy() *MonitoringStackList

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

func (*MonitoringStackList) DeepCopyInto

func (in *MonitoringStackList) DeepCopyInto(out *MonitoringStackList)

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

func (*MonitoringStackList) DeepCopyObject

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

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

type MonitoringStackSpec

type MonitoringStackSpec struct {
	// +optional
	// +kubebuilder:default="info"
	LogLevel LogLevel `json:"logLevel,omitempty"`

	// Label selector for Monitoring Stack Resources.
	// To monitor everything, set to empty map selector. E.g. resourceSelector: {}.
	// To disable service discovery, set to null. E.g. resourceSelector:.
	// +optional
	// +nullable
	ResourceSelector *metav1.LabelSelector `json:"resourceSelector"`

	// Namespace selector for Monitoring Stack Resources.
	// To monitor everything, set to empty map selector. E.g. namespaceSelector: {}.
	// To monitor resources in the namespace where Monitoring Stack was created in, set to null. E.g. namespaceSelector:.
	// +optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`

	// Time duration to retain data for. Default is '120h',
	// and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years).
	// +kubebuilder:default="120h"
	Retention monv1.Duration `json:"retention,omitempty"`

	// Define resources requests and limits for Monitoring Stack Pods.
	// +optional
	// +kubebuilder:default={requests:{cpu: "100m", memory: "256Mi"}, limits:{memory: "512Mi", cpu: "500m"}}
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Define tolerations for Monitoring Stack Pods.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// Define node selector for Monitoring Stack Pods.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Define prometheus config
	// +optional
	// +kubebuilder:default={replicas: 2}
	PrometheusConfig *PrometheusConfig `json:"prometheusConfig,omitempty"`

	// Define Alertmanager config
	// +optional
	// +kubebuilder:default={disabled: false}
	AlertmanagerConfig AlertmanagerConfig `json:"alertmanagerConfig,omitempty"`
}

MonitoringStackSpec is the specification for desired Monitoring Stack

func (*MonitoringStackSpec) DeepCopy

func (in *MonitoringStackSpec) DeepCopy() *MonitoringStackSpec

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

func (*MonitoringStackSpec) DeepCopyInto

func (in *MonitoringStackSpec) DeepCopyInto(out *MonitoringStackSpec)

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

type MonitoringStackStatus

type MonitoringStackStatus struct {
	// Conditions provide status information about the MonitoringStack
	// +listType=atomic
	Conditions []Condition `json:"conditions"`
}

MonitoringStackStatus defines the observed state of MonitoringStack. It should always be reconstructable from the state of the cluster and/or outside world.

func (*MonitoringStackStatus) DeepCopy

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

func (*MonitoringStackStatus) DeepCopyInto

func (in *MonitoringStackStatus) DeepCopyInto(out *MonitoringStackStatus)

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

type NamespaceSelector

type NamespaceSelector struct {
	// Boolean describing whether all namespaces are selected in contrast to a
	// list restricting them.
	Any bool `json:"any,omitempty"`
	// List of namespace names.
	MatchNames []string `json:"matchNames,omitempty"`
}

NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces. +k8s:openapi-gen=true

func (*NamespaceSelector) DeepCopy

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

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

func (*NamespaceSelector) DeepCopyInto

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

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

type PrometheusConfig

type PrometheusConfig struct {
	// Number of replicas/pods to deploy for a Prometheus deployment.
	// +optional
	// +kubebuilder:default=2
	// +kubebuilder:validation:Minimum=0
	Replicas *int32 `json:"replicas,omitempty"`

	// Define remote write for prometheus
	// +optional
	RemoteWrite []monv1.RemoteWriteSpec `json:"remoteWrite,omitempty"`
	// Define persistent volume claim for prometheus
	// +optional
	PersistentVolumeClaim *corev1.PersistentVolumeClaimSpec `json:"persistentVolumeClaim,omitempty"`
	// Define ExternalLabels for prometheus
	// +optional
	ExternalLabels map[string]string `json:"externalLabels,omitempty"`
	// Enable Prometheus to be used as a receiver for the Prometheus remote write protocol. Defaults to the value of `false`.
	// +optional
	EnableRemoteWriteReceiver bool `json:"enableRemoteWriteReceiver,omitempty"`
	// Enable Prometheus to accept OpenTelemetry Metrics via the otlp/http protocol.
	// Defaults to the value of `false`.
	// The resulting endpoint is /api/v1/otlp/v1/metrics.
	// +optional
	EnableOtlpHttpReceiver *bool `json:"enableOtlpHttpReceiver,omitempty"`
	// Default interval between scrapes.
	// +optional
	ScrapeInterval *monv1.Duration `json:"scrapeInterval,omitempty"`
	// Configure TLS options for the Prometheus web server.
	// +optional
	WebTLSConfig *WebTLSConfig `json:"webTLSConfig,omitempty"`
}

func (*PrometheusConfig) DeepCopy

func (in *PrometheusConfig) DeepCopy() *PrometheusConfig

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

func (*PrometheusConfig) DeepCopyInto

func (in *PrometheusConfig) DeepCopyInto(out *PrometheusConfig)

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

type SecretKeySelector

type SecretKeySelector struct {
	// The name of the secret in the object's namespace to select from.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Required
	Name string `json:"name"`
	// The key of the secret to select from.  Must be a valid secret key.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Required
	Key string `json:"key"`
}

SecretKeySelector selects a key of a secret.

func (*SecretKeySelector) DeepCopy

func (in *SecretKeySelector) DeepCopy() *SecretKeySelector

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

func (*SecretKeySelector) DeepCopyInto

func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)

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

type ThanosQuerier

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

	Spec   ThanosQuerierSpec   `json:"spec,omitempty"`
	Status ThanosQuerierStatus `json:"status,omitempty"`
}

ThanosQuerier outlines the Thanos querier components, managed by this stack +k8s:openapi-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource +kubebuilder:subresource:status +kubebuilder:metadata:annotations="observability.openshift.io/api-support=TechPreview"

func (*ThanosQuerier) DeepCopy

func (in *ThanosQuerier) DeepCopy() *ThanosQuerier

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

func (*ThanosQuerier) DeepCopyInto

func (in *ThanosQuerier) DeepCopyInto(out *ThanosQuerier)

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

func (*ThanosQuerier) DeepCopyObject

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

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

func (ThanosQuerier) MatchesNamespace

func (t ThanosQuerier) MatchesNamespace(namespace string) bool

type ThanosQuerierList

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

ThanosQuerierList contains a list of ThanosQuerier +kubebuilder:resource +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*ThanosQuerierList) DeepCopy

func (in *ThanosQuerierList) DeepCopy() *ThanosQuerierList

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

func (*ThanosQuerierList) DeepCopyInto

func (in *ThanosQuerierList) DeepCopyInto(out *ThanosQuerierList)

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

func (*ThanosQuerierList) DeepCopyObject

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

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

type ThanosQuerierSpec

type ThanosQuerierSpec struct {
	// Selector to select Monitoring stacks to unify
	Selector metav1.LabelSelector `json:"selector"`
	// Selector to select which namespaces the Monitoring Stack objects are discovered from.
	NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`
	ReplicaLabels     []string          `json:"replicaLabels,omitempty"`
}

ThanosQuerierSpec defines a single Thanos Querier instance. This means a label selector by which Monitoring Stack instances to query are selected, and an optional namespace selector and a list of replica labels by which to deduplicate.

func (*ThanosQuerierSpec) DeepCopy

func (in *ThanosQuerierSpec) DeepCopy() *ThanosQuerierSpec

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

func (*ThanosQuerierSpec) DeepCopyInto

func (in *ThanosQuerierSpec) DeepCopyInto(out *ThanosQuerierSpec)

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

type ThanosQuerierStatus

type ThanosQuerierStatus struct{}

ThanosQuerierStatus defines the observed state of ThanosQuerier. It should always be reconstructable from the state of the cluster and/or outside world.

func (*ThanosQuerierStatus) DeepCopy

func (in *ThanosQuerierStatus) DeepCopy() *ThanosQuerierStatus

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

func (*ThanosQuerierStatus) DeepCopyInto

func (in *ThanosQuerierStatus) DeepCopyInto(out *ThanosQuerierStatus)

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

type WebTLSConfig

type WebTLSConfig struct {
	// Reference to the TLS private key for the web server.
	// +kubebuilder:validation:Required
	PrivateKey SecretKeySelector `json:"privateKey"`
	// Reference to the TLS public certificate for the web server.
	// +kubebuilder:validation:Required
	Certificate SecretKeySelector `json:"certificate"`
	// Reference to the root Certificate Authority used to verify the web server's certificate.
	// +kubebuilder:validation:Required
	CertificateAuthority SecretKeySelector `json:"certificateAuthority"`
}

WebTLSConfig contains configuration to enable TLS on web endpoints.

func (*WebTLSConfig) DeepCopy

func (in *WebTLSConfig) DeepCopy() *WebTLSConfig

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

func (*WebTLSConfig) DeepCopyInto

func (in *WebTLSConfig) DeepCopyInto(out *WebTLSConfig)

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