Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the rhobs v1alpha1 API group
The observability-operator API module uses semantic versioning for version tags, but does not guarantee backward compatibility, even for versions v1.0.0 and above. Breaking changes may occur without major version bumps.
+kubebuilder:object:generate=true +groupName=monitoring.rhobs
Index ¶
- Constants
- Variables
- type AlertmanagerConfig
- type ClusterRoleBindingPolicy
- type Condition
- type ConditionStatus
- type ConditionType
- type LogLevel
- type MonitoringStack
- type MonitoringStackList
- type MonitoringStackSpec
- type MonitoringStackStatus
- type NamespaceSelector
- type PrometheusConfig
- type SecretKeySelector
- type ThanosQuerier
- type ThanosQuerierList
- type ThanosQuerierSpec
- type ThanosQuerierStatus
- type WebTLSConfig
Constants ¶
const ( ConditionTrue ConditionStatus = "True" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" ReconciledCondition ConditionType = "Reconciled" AvailableCondition ConditionType = "Available" ResourceDiscoveryCondition ConditionType = "ResourceDiscovery" )
Variables ¶
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 = runtime.NewSchemeBuilder(addTypes) // 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 ClusterRoleBindingPolicy ¶
type ClusterRoleBindingPolicy string
+kubebuilder:validation:Enum=CreateClusterRoleBindings;NoClusterRoleBindings
const ( // CreateClusterRoleBindings instructs the MonitoringStack to create the // default ClusterRoleBindings if a NamespaceSelector is present. Note that // this allows user who can access the Prometheus or Alertmanager // ServiceAccounts to possibly elevate their priviledges. CreateClusterRoleBindings ClusterRoleBindingPolicy = "CreateClusterRoleBindings" // NoClusterRoleBindings instructs the MonitoringStack controller to _not_ // create any ClusterRoleBindings. If the MonitoringStack is configured with // a NamespaceSelector, admin users will have to create the appropriate // RoleBindings to allow access to the desired namespaces. NoClusterRoleBindings ClusterRoleBindingPolicy = "NoClusterRoleBindings" )
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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
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"`
// CreateClusterRoleBindings for a Monitoring Stack Resource
// If a NamespaceSelector is given, the controller can create a
// ClusterRoleBinding for the Prometheus and Alertmanager
// ServiceAccounts. This allows the
// ServiceAccount access to all namespaces, allowing the
// ServiceDiscovery to work across namespaces out of the
// box. However by impersonating this ServiceAccount a user could elevate
// their access in unintended ways.
// To avoid this set CreateClusterRoleBindings to NoClusterRoleBindings. Note
// that admins must create the needed namespaced RoleBindings manually
// so that endpoint discovery works as expected.
// +kubebuilder:default="CreateClusterRoleBindings"
// +optional
CreateClusterRoleBindings ClusterRoleBindingPolicy `json:"createClusterRoleBindings,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 ¶
func (in *MonitoringStackStatus) DeepCopy() *MonitoringStackStatus
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 is the label selector used to select MonitoringStack
// resources.
//
// By default, all resources are matched.
Selector metav1.LabelSelector `json:"selector"`
// namespaceSelector defines in which namespaces the MonitoringStack
// resources are discovered from.
//
// By default, resources are only discovered in the current namespace.
NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`
// replicaLabels is the list of labels used to deduplicate the data between
// highly-available replicas.
//
// Thanos Querier is always configured with `prometheus_replica` as replica
// label.
// +optional
ReplicaLabels []string `json:"replicaLabels,omitempty"`
// webTLSConfig configures the TLS options for the Thanos web server.
// +optional
WebTLSConfig *WebTLSConfig `json:"webTLSConfig,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.