Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the observability v1alpha1 API group +kubebuilder:object:generate=true +groupName=observability.pingdom.mig4.gitlab.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "observability.pingdom.mig4.gitlab.io", 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 Check ¶
type Check struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CheckSpec `json:"spec,omitempty"` Status CheckStatus `json:"status,omitempty"` }
Check is the Schema for the checks API
func (*Check) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Check.
func (*Check) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Check) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Check) NeedsUpdate ¶
NeedsUpdate returns true if the external resource coresponding to this check needs to be updated because its Spec differs from its Status.
The Spec reflects requested state of the resource while Status reflects its state in Kubernetes.
Optional fields that aren't set in the Spec do not affect the comparison (in this case the field in Status may still be set as it reflects the default value returned from Pingdom API, but that's of no consequence).
type CheckList ¶
type CheckList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Check `json:"items"` }
CheckList contains a list of Check
func (*CheckList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckList.
func (*CheckList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CheckList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CheckParameters ¶
type CheckParameters struct { // Check name; defaults to name of the object in Kubernetes // +optional Name *string `json:"name"` // Target host Host string `json:"host"` // Type of check, can be one of: // http, httpcustom, tcp, ping, dns, udp, smtp, pop3, imap Type CheckType `json:"type"` // Target port // Required for check types: tcp, udp // Optional for: http(80), httpcustom(80), smtp(25), pop3(110), imap(143) // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 // +optional Port *int32 `json:"port,omitempty"` // How often should the check be tested? (minutes) // +optional ResolutionMinutes *int32 `json:"resolutionMinutes,omitempty"` // User identifiers of users who should receive alerts // +optional UserIds *[]int `json:"userids,omitempty"` // Target path on server // Defaults to `/`. // +optional URL *string `json:"url,omitempty"` // Connection encryption; defaults to false // +optional Encryption *bool `json:"encryption,omitempty"` }
CheckParameters are parameters of a Check in Pingdom
func (*CheckParameters) DeepCopy ¶
func (in *CheckParameters) DeepCopy() *CheckParameters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckParameters.
func (*CheckParameters) DeepCopyInto ¶
func (in *CheckParameters) DeepCopyInto(out *CheckParameters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CheckResult ¶
type CheckResult string
CheckResult is a status/result of a check. +kubebuilder:validation:Enum=up;down;unconfirmed_down;unknown;paused
const ( Up CheckResult = "up" Down CheckResult = "down" UnconfirmedDown CheckResult = "unconfirmed_down" Unknown CheckResult = "unknown" Paused CheckResult = "paused" )
Possible values of CheckResult, used in CheckStatus.Status
type CheckSpec ¶
type CheckSpec struct { // Parameters of a Check CheckParameters `json:",inline"` // Paused; defaults to false. // Note this is a spec only field as Pingdom API read operations indicate // a paused state by the `status` field being set to `paused`. // +optional Paused *bool `json:"paused,omitempty"` // Secret storing Pingdom API credentials CredentialsSecret corev1.LocalObjectReference `json:"credentialsSecret"` }
CheckSpec defines the desired state of Check
func (*CheckSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckSpec.
func (*CheckSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CheckSpec) PostParams ¶
PostParams returns a map of parameters to send in POST requests (for creating a check) to the Pingdom API.
Only non-nil properties of the CheckSpec are included in the resulting map.
Implements pingdom.Check interface.
func (*CheckSpec) PutParams ¶
PutParams returns a map of parameters to send in PUT requests (for updating a check) to the Pingdom API.
Only non-nil properties of the CheckSpec are included in the resulting map.
Implements pingdom.Check interface.
TODO: moving these methods to Check would allow e.g. PUT to be smarter and
only output fields that have changed, or handling clearing of fields
type CheckStatus ¶
type CheckStatus struct { // Parameters of a Check CheckParameters `json:",inline"` // Check identifier ID int32 `json:"id"` // Current check status Status CheckResult `json:"status"` // Timestamp of last error (if any). // +optional LastErrorTime *metav1.Time `json:"lasterrortime,omitempty"` // Timestamp of last test (if any). // +optional LastTestTime *metav1.Time `json:"lasttesttime,omitempty"` // Response time (in milliseconds) of last test. // +optional LastResponseTimeMilis *int64 `json:"lastresponsetime,omitempty"` // Check creation time. CreatedTime metav1.Time `json:"created"` }
CheckStatus defines the observed state of Check
func (*CheckStatus) DeepCopy ¶
func (in *CheckStatus) DeepCopy() *CheckStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckStatus.
func (*CheckStatus) DeepCopyInto ¶
func (in *CheckStatus) DeepCopyInto(out *CheckStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CheckType ¶
type CheckType string
CheckType is a type of the check. +kubebuilder:validation:Enum=http;httpcustom;tcp;ping;dns;udp;smtp;pop3;imap
const ( // HTTP is a check type that verifies response to a HTTP request HTTP CheckType = "http" // HTTPCustom is a check type that verifies response to a custom HTTP request HTTPCustom CheckType = "httpcustom" // TCP is a check type that sends a packet to a TCP port TCP CheckType = "tcp" // Ping is a check type that sends a ping (ICMP request) to the host Ping CheckType = "ping" // DNS is a check type that tries to resolve host using specified DNS server DNS CheckType = "dns" // UDP is a check type that sends a packet to a UDP port UDP CheckType = "udp" // SMTP is a check type that opens a connection to SMTP server SMTP CheckType = "smtp" // POP3 is a check type that opens a connection to a POP3 server POP3 CheckType = "pop3" // IMAP is a check type that opens a connection to an IMAP server IMAP CheckType = "imap" )