Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the monitoring v1alpha1 API group. +kubebuilder:object:generate=true +groupName=monitoring.siutsin.com
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "monitoring.siutsin.com", 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 EndpointSecretRef ¶
type EndpointSecretRef struct {
// Name of the secret
// +kubebuilder:validation:Required
Name string `json:"name"`
// Namespace of the secret. If empty, defaults to the same namespace as the Heartbeat resource
// +optional
Namespace string `json:"namespace,omitempty"`
// Key in the secret that contains the endpoint URL
// +kubebuilder:validation:Required
Key string `json:"key"`
}
EndpointSecretRef defines a reference to a Kubernetes secret containing endpoint information
func (*EndpointSecretRef) DeepCopy ¶
func (in *EndpointSecretRef) DeepCopy() *EndpointSecretRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointSecretRef.
func (*EndpointSecretRef) DeepCopyInto ¶
func (in *EndpointSecretRef) DeepCopyInto(out *EndpointSecretRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EndpointsSecret ¶
type EndpointsSecret struct {
// Name of the secret
// +kubebuilder:validation:Required
Name string `json:"name"`
// Namespace of the secret. If empty, defaults to the same namespace as the Heartbeat resource
// +optional
Namespace string `json:"namespace,omitempty"`
// TargetEndpointKey is the key in the secret that contains the target endpoint URL
// +kubebuilder:validation:Required
TargetEndpointKey string `json:"targetEndpointKey"`
// HealthyEndpointKey is the key in the secret that contains the healthy endpoint URL
// +kubebuilder:validation:Required
HealthyEndpointKey string `json:"healthyEndpointKey"`
// UnhealthyEndpointKey is the key in the secret that contains the unhealthy endpoint URL
// +kubebuilder:validation:Required
UnhealthyEndpointKey string `json:"unhealthyEndpointKey"`
// HealthyEndpointMethod is the HTTP method to use when reporting to the healthy endpoint
// +kubebuilder:validation:Enum=GET;POST;PUT;PATCH
// +kubebuilder:default=GET
// +optional
HealthyEndpointMethod string `json:"healthyEndpointMethod,omitempty"`
// UnhealthyEndpointMethod is the HTTP method to use when reporting to the unhealthy endpoint
// +kubebuilder:validation:Enum=GET;POST;PUT;PATCH
// +kubebuilder:default=GET
// +optional
UnhealthyEndpointMethod string `json:"unhealthyEndpointMethod,omitempty"`
}
EndpointsSecret defines the configuration for the secret containing endpoint URLs
func (*EndpointsSecret) DeepCopy ¶
func (in *EndpointsSecret) DeepCopy() *EndpointsSecret
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointsSecret.
func (*EndpointsSecret) DeepCopyInto ¶
func (in *EndpointsSecret) DeepCopyInto(out *EndpointsSecret)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Heartbeat ¶
type Heartbeat struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HeartbeatSpec `json:"spec,omitempty"`
Status HeartbeatStatus `json:"status,omitempty"`
}
Heartbeat is the Schema for the heartbeats API.
func (*Heartbeat) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Heartbeat.
func (*Heartbeat) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Heartbeat) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Heartbeat) ValidateCreate ¶
ValidateCreate validates the Heartbeat resource on creation
type HeartbeatList ¶
type HeartbeatList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Heartbeat `json:"items"`
}
HeartbeatList contains a list of Heartbeat.
func (*HeartbeatList) DeepCopy ¶
func (in *HeartbeatList) DeepCopy() *HeartbeatList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatList.
func (*HeartbeatList) DeepCopyInto ¶
func (in *HeartbeatList) DeepCopyInto(out *HeartbeatList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HeartbeatList) DeepCopyObject ¶
func (in *HeartbeatList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HeartbeatSpec ¶
type HeartbeatSpec struct {
// EndpointsSecret is the reference to the secret containing all endpoint URLs
// +kubebuilder:validation:Required
EndpointsSecret EndpointsSecret `json:"endpointsSecret"`
// ExpectedStatusCodeRanges defines the ranges of HTTP status codes that are considered healthy
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinItems=1
ExpectedStatusCodeRanges []StatusCodeRange `json:"expectedStatusCodeRanges"`
// Interval is the time between health checks
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=^([0-9]+(s|m|h))$
// +kubebuilder:validation:Description="Duration between health checks (e.g., 30s, 5m, 1h)"
// +kubebuilder:default="60s"
Interval string `json:"interval"`
}
HeartbeatSpec defines the desired state of Heartbeat.
func (*HeartbeatSpec) DeepCopy ¶
func (in *HeartbeatSpec) DeepCopy() *HeartbeatSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatSpec.
func (*HeartbeatSpec) DeepCopyInto ¶
func (in *HeartbeatSpec) DeepCopyInto(out *HeartbeatSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HeartbeatStatus ¶
type HeartbeatStatus struct {
// Healthy indicates whether the endpoint is healthy
Healthy bool `json:"healthy"`
// LastStatus contains the last HTTP status code received from the endpoint
LastStatus int `json:"lastStatus"`
// Message contains a human-readable message about the endpoint status
Message string `json:"message"`
// LastChecked is the timestamp of the last health check
LastChecked *metav1.Time `json:"lastChecked,omitempty"`
// ReportStatus indicates if the last report (to healthy/unhealthy endpoint) was successful
ReportStatus string `json:"reportStatus,omitempty"`
}
HeartbeatStatus defines the observed state of Heartbeat.
func (*HeartbeatStatus) DeepCopy ¶
func (in *HeartbeatStatus) DeepCopy() *HeartbeatStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeartbeatStatus.
func (*HeartbeatStatus) DeepCopyInto ¶
func (in *HeartbeatStatus) DeepCopyInto(out *HeartbeatStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HeartbeatStatus) String ¶
func (s HeartbeatStatus) String() string
String returns a human-readable representation of the status
type StatusCodeRange ¶
type StatusCodeRange struct {
// Min is the minimum status code in the range (inclusive)
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=100
// +kubebuilder:validation:Maximum=599
Min int `json:"min"`
// Max is the maximum status code in the range (inclusive)
// +kubebuilder:validation:Required
// +kubebuilder:validation:Minimum=100
// +kubebuilder:validation:Maximum=599
Max int `json:"max"`
}
StatusCodeRange defines a range of HTTP status codes
func (*StatusCodeRange) DeepCopy ¶
func (in *StatusCodeRange) DeepCopy() *StatusCodeRange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusCodeRange.
func (*StatusCodeRange) DeepCopyInto ¶
func (in *StatusCodeRange) DeepCopyInto(out *StatusCodeRange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.