Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the canaries v1 API group +kubebuilder:object:generate=true +groupName=canaries.flanksource.com
Index ¶
- Variables
- func GetEnvVarRefValue(kc kubernetes.Interface, ns string, from *VarSource, obj runtime.Object) (string, error)
- type Bucket
- type Canary
- type CanaryList
- type CanarySpec
- type CanaryStatus
- type CanaryStatusCondition
- type Condition
- type ConditionStatus
- type ContainerdPullCheck
- type ContainerdPushCheck
- type DNS
- type DNSCheck
- type DockerPull
- type DockerPullCheck
- type DockerPush
- type DockerPushCheck
- type HTTP
- type HTTPCheck
- type Helm
- type HelmCheck
- type ICMP
- type ICMPCheck
- type LDAP
- type LDAPCheck
- type Namespace
- type NamespaceCheck
- type Pod
- type PodCheck
- type Postgres
- type PostgresCheck
- func (in *PostgresCheck) DeepCopy() *PostgresCheck
- func (in *PostgresCheck) DeepCopyInto(out *PostgresCheck)
- func (c PostgresCheck) GetDescription() string
- func (c PostgresCheck) GetEndpoint() string
- func (c PostgresCheck) GetType() string
- func (c *PostgresCheck) UnmarshalYAML(unmarshal func(interface{}) error) error
- type S3
- type S3Bucket
- type S3BucketCheck
- type S3Check
- type SSL
- type SSLCheck
- type SrvReply
- type TCP
- type TCPCheck
- type VarSource
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "canaries.flanksource.com", Version: "v1"} // 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 )
var AllChecks = []external.Check{ HTTPCheck{}, SSLCheck{}, TCPCheck{}, ICMPCheck{}, S3Check{}, S3BucketCheck{}, DockerPullCheck{}, DockerPushCheck{}, ContainerdPullCheck{}, ContainerdPushCheck{}, PostgresCheck{}, PodCheck{}, LDAPCheck{}, NamespaceCheck{}, DNSCheck{}, HelmCheck{}, }
Functions ¶
func GetEnvVarRefValue ¶
func GetEnvVarRefValue(kc kubernetes.Interface, ns string, from *VarSource, obj runtime.Object) (string, error)
GetEnvVarRefValue returns the value referenced by the supplied EnvVarSource given the other supplied information.
Types ¶
type Bucket ¶
type Bucket struct { Name string `yaml:"name" json:"name,omitempty"` Region string `yaml:"region" json:"region,omitempty"` Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` }
func (*Bucket) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket.
func (*Bucket) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Canary ¶
type Canary struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CanarySpec `json:"spec,omitempty"` Status CanaryStatus `json:"status,omitempty"` }
Canary is the Schema for the canaries API +kubebuilder:printcolumn:name="Interval",type=string,JSONPath=`.spec.interval` +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status` +kubebuilder:printcolumn:name="Message",type=string,JSONPath=`.status.message` +kubebuilder:printcolumn:name="Uptime 1H",type=string,JSONPath=`.status.uptime1h` +kubebuilder:printcolumn:name="Latency 1H",type=string,JSONPath=`.status.latency1h` +kubebuilder:printcolumn:name="Last Transitioned",type=date,JSONPath=`.status.lastTransitionedTime` +kubebuilder:printcolumn:name="Last Check",type=date,JSONPath=`.status.lastCheck` +kubebuilder:subresource:status
func (*Canary) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Canary.
func (*Canary) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Canary) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (Canary) GetDescription ¶ added in v0.11.4
type CanaryList ¶
type CanaryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Canary `json:"items"` }
CanaryList contains a list of Canary
func (*CanaryList) DeepCopy ¶
func (in *CanaryList) DeepCopy() *CanaryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryList.
func (*CanaryList) DeepCopyInto ¶
func (in *CanaryList) DeepCopyInto(out *CanaryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CanaryList) DeepCopyObject ¶
func (in *CanaryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CanarySpec ¶
type CanarySpec struct { Env map[string]VarSource `yaml:"env,omitempty" json:"env,omitempty"` HTTP []HTTPCheck `yaml:"http,omitempty" json:"http,omitempty"` DNS []DNSCheck `yaml:"dns,omitempty" json:"dns,omitempty"` DockerPull []DockerPullCheck `yaml:"docker,omitempty" json:"docker,omitempty"` DockerPush []DockerPushCheck `yaml:"dockerPush,omitempty" json:"dockerPush,omitempty"` ContainerdPull []ContainerdPullCheck `yaml:"containerd,omitempty" json:"containerd,omitempty"` ContainerdPush []ContainerdPushCheck `yaml:"containerdPush,omitempty" json:"containerdPush,omitempty"` S3 []S3Check `yaml:"s3,omitempty" json:"s3,omitempty"` S3Bucket []S3BucketCheck `yaml:"s3Bucket,omitempty" json:"s3Bucket,omitempty"` TCP []TCPCheck `yaml:"tcp,omitempty" json:"tcp,omitempty"` Pod []PodCheck `yaml:"pod,omitempty" json:"pod,omitempty"` LDAP []LDAPCheck `yaml:"ldap,omitempty" json:"ldap,omitempty"` SSL []SSLCheck `yaml:"ssl,omitempty" json:"ssl,omitempty"` ICMP []ICMPCheck `yaml:"icmp,omitempty" json:"icmp,omitempty"` Postgres []PostgresCheck `yaml:"postgres,omitempty" json:"postgres,omitempty"` Helm []HelmCheck `yaml:"helm,omitempty" json:"helm,omitempty"` Namespace []NamespaceCheck `yaml:"namespace,omitempty" json:"namespace,omitempty"` Interval uint64 `yaml:"interval,omitempty" json:"interval,omitempty"` }
CanarySpec defines the desired state of Canary
func (*CanarySpec) DeepCopy ¶
func (in *CanarySpec) DeepCopy() *CanarySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanarySpec.
func (*CanarySpec) DeepCopyInto ¶
func (in *CanarySpec) DeepCopyInto(out *CanarySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (CanarySpec) GetAllChecks ¶ added in v0.11.4
func (spec CanarySpec) GetAllChecks() []external.Check
type CanaryStatus ¶
type CanaryStatus struct { // +optional LastTransitionedTime *metav1.Time `json:"lastTransitionedTime,omitempty"` // +optionals LastCheck *metav1.Time `json:"lastCheck,omitempty"` // +optional Status *CanaryStatusCondition `json:"status,omitempty"` // +optional Message *string `json:"message,omitempty"` // If set, this represents the .metadata.generation that the status was set for // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` // Availibility over a rolling 1h period Uptime1H string `json:"uptime1h,omitempty"` // Average latency to complete all checks Latency1H string `json:"latency1h,omitempty"` }
CanaryStatus defines the observed state of Canary
func (*CanaryStatus) DeepCopy ¶
func (in *CanaryStatus) DeepCopy() *CanaryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryStatus.
func (*CanaryStatus) DeepCopyInto ¶
func (in *CanaryStatus) DeepCopyInto(out *CanaryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryStatusCondition ¶
type CanaryStatusCondition string
var ( Passed CanaryStatusCondition = "Passed" Failed CanaryStatusCondition = "Failed" Invalid CanaryStatusCondition = "Invalid" )
type Condition ¶
type Condition struct { // Type of condition in CamelCase or in foo.example.com/CamelCase. // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be // useful (see .node.status.conditions), the ability to deconflict is important. // +required Type string `json:"type" protobuf:"bytes,1,opt,name=type"` // Status of the condition, one of True, False, Unknown. // +required Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` // If set, this represents the .metadata.generation that the condition was set based upon. // For instance, if .metadata.generation is currently 12, but the .status.condition[x].observedGeneration is 9, the condition is out of date // with respect to the current state of the instance. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"` // 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 LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. // This field may not be empty. // +required Reason string `json:"reason" protobuf:"bytes,5,opt,name=reason"` // A human readable message indicating details about the transition. // This field may be empty. // +required Message string `json:"message" protobuf:"bytes,6,opt,name=message"` }
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
const ( ConditionStatusTrue ConditionStatus = "True" ConditionStatusFalse ConditionStatus = "False" ConditionStatusUnknown ConditionStatus = "Unknown" )
type ContainerdPullCheck ¶ added in v0.12.0
type ContainerdPullCheck struct { Description string `yaml:"description" json:"description,omitempty"` Image string `yaml:"image" json:"image,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` ExpectedDigest string `yaml:"expectedDigest" json:"expectedDigest,omitempty"` ExpectedSize int64 `yaml:"expectedSize" json:"expectedSize,omitempty"` }
func (ContainerdPullCheck) GetDescription ¶ added in v0.12.0
func (c ContainerdPullCheck) GetDescription() string
func (ContainerdPullCheck) GetEndpoint ¶ added in v0.12.0
func (c ContainerdPullCheck) GetEndpoint() string
func (ContainerdPullCheck) GetType ¶ added in v0.12.0
func (c ContainerdPullCheck) GetType() string
type ContainerdPushCheck ¶ added in v0.12.0
type ContainerdPushCheck struct { Description string `yaml:"description" json:"description,omitempty"` Image string `yaml:"image" json:"image,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` }
func (ContainerdPushCheck) GetDescription ¶ added in v0.12.0
func (c ContainerdPushCheck) GetDescription() string
func (ContainerdPushCheck) GetEndpoint ¶ added in v0.12.0
func (c ContainerdPushCheck) GetEndpoint() string
func (ContainerdPushCheck) GetType ¶ added in v0.12.0
func (c ContainerdPushCheck) GetType() string
type DNS ¶
type DNS struct {
DNSCheck `yaml:",inline" json:"inline"`
}
```yaml dns:
- server: 8.8.8.8 port: 53 query: "flanksource.com" querytype: "A" minrecords: 1 exactreply: ["34.65.228.161"] timeout: 10
```
func (*DNS) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS.
func (*DNS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DNSCheck ¶
type DNSCheck struct { Description string `yaml:"description" json:"description,omitempty"` Server string `yaml:"server" json:"server,omitempty"` Port int `yaml:"port" json:"port,omitempty"` Query string `yaml:"query,omitempty" json:"query,omitempty"` QueryType string `yaml:"querytype" json:"querytype,omitempty"` MinRecords int `yaml:"minrecords,omitempty" json:"minrecords,omitempty"` ExactReply []string `yaml:"exactreply,omitempty" json:"exactreply,omitempty"` Timeout int `yaml:"timeout" json:"timeout,omitempty"` ThresholdMillis int `yaml:"thresholdMillis" json:"thresholdMillis,omitempty"` }
func (*DNSCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSCheck.
func (*DNSCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DNSCheck) GetDescription ¶
func (DNSCheck) GetEndpoint ¶
type DockerPull ¶
type DockerPull struct {
DockerPullCheck `yaml:",inline" json:"inline"`
}
Check docker images ¶
This check will try to pull a Docker image from specified registry, verify it's checksum and size.
```yaml
docker:
- image: docker.io/library/busybox:1.31.1 username: password: expectedDigest: 6915be4043561d64e0ab0f8f098dc2ac48e077fe23f488ac24b665166898115a expectedSize: 1219782
```
func (*DockerPull) DeepCopy ¶
func (in *DockerPull) DeepCopy() *DockerPull
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerPull.
func (*DockerPull) DeepCopyInto ¶
func (in *DockerPull) DeepCopyInto(out *DockerPull)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerPullCheck ¶
type DockerPullCheck struct { Description string `yaml:"description" json:"description,omitempty"` Image string `yaml:"image" json:"image,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` ExpectedDigest string `yaml:"expectedDigest" json:"expectedDigest,omitempty"` ExpectedSize int64 `yaml:"expectedSize" json:"expectedSize,omitempty"` }
func (*DockerPullCheck) DeepCopy ¶
func (in *DockerPullCheck) DeepCopy() *DockerPullCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerPullCheck.
func (*DockerPullCheck) DeepCopyInto ¶
func (in *DockerPullCheck) DeepCopyInto(out *DockerPullCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DockerPullCheck) GetDescription ¶
func (c DockerPullCheck) GetDescription() string
func (DockerPullCheck) GetEndpoint ¶
func (c DockerPullCheck) GetEndpoint() string
func (DockerPullCheck) GetType ¶
func (c DockerPullCheck) GetType() string
type DockerPush ¶
type DockerPush struct {
DockerPushCheck `yaml:",inline" json:"inline"`
}
func (*DockerPush) DeepCopy ¶
func (in *DockerPush) DeepCopy() *DockerPush
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerPush.
func (*DockerPush) DeepCopyInto ¶
func (in *DockerPush) DeepCopyInto(out *DockerPush)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerPushCheck ¶
type DockerPushCheck struct { Description string `yaml:"description" json:"description,omitempty"` Image string `yaml:"image" json:"image,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` }
func (*DockerPushCheck) DeepCopy ¶
func (in *DockerPushCheck) DeepCopy() *DockerPushCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerPushCheck.
func (*DockerPushCheck) DeepCopyInto ¶
func (in *DockerPushCheck) DeepCopyInto(out *DockerPushCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (DockerPushCheck) GetDescription ¶
func (c DockerPushCheck) GetDescription() string
func (DockerPushCheck) GetEndpoint ¶
func (c DockerPushCheck) GetEndpoint() string
func (DockerPushCheck) GetType ¶
func (c DockerPushCheck) GetType() string
type HTTP ¶
type HTTP struct {
HTTPCheck `yaml:",inline" json:"inline"`
}
```yaml http:
- endpoints:
- https://httpstat.us/200
- https://httpstat.us/301 thresholdMillis: 3000 responseCodes: [201,200,301] responseContent: "" maxSSLExpiry: 60
- endpoints:
- https://httpstat.us/500 thresholdMillis: 3000 responseCodes: [500] responseContent: "" maxSSLExpiry: 60
- endpoints:
- https://httpstat.us/500 thresholdMillis: 3000 responseCodes: [302] responseContent: "" maxSSLExpiry: 60
```
func (*HTTP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTP.
func (*HTTP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPCheck ¶
type HTTPCheck struct { Description string `yaml:"description" json:"description,omitempty"` // HTTP endpoint to crawl Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` // Maximum duration in milliseconds for the HTTP request. It will fail the check if it takes longer. ThresholdMillis int `yaml:"thresholdMillis" json:"thresholdMillis,omitempty"` // Expected response codes for the HTTP Request. ResponseCodes []int `yaml:"responseCodes" json:"responseCodes,omitempty"` // Exact response content expected to be returned by the endpoint. ResponseContent string `yaml:"responseContent" json:"responseContent,omitempty"` // Maximum number of days until the SSL Certificate expires. MaxSSLExpiry int `yaml:"maxSSLExpiry" json:"maxSSLExpiry,omitempty"` }
func (*HTTPCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCheck.
func (*HTTPCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HTTPCheck) GetDescription ¶
func (HTTPCheck) GetEndpoint ¶
type Helm ¶
type Helm struct {
HelmCheck `yaml:",inline" json:"inline"`
}
func (*Helm) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Helm.
func (*Helm) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmCheck ¶
type HelmCheck struct { Description string `yaml:"description" json:"description,omitempty"` Chartmuseum string `yaml:"chartmuseum" json:"chartmuseum,omitempty"` Project string `yaml:"project,omitempty" json:"project,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` CaFile *string `yaml:"cafile,omitempty" json:"cafile,omitempty"` }
func (*HelmCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmCheck.
func (*HelmCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (HelmCheck) GetDescription ¶
func (HelmCheck) GetEndpoint ¶
type ICMP ¶
type ICMP struct {
ICMPCheck `yaml:",inline" json:"inline"`
}
This test will check ICMP packet loss and duration.
```yaml
icmp:
- endpoints:
- https://google.com
- https://yahoo.com thresholdMillis: 400 packetLossThreshold: 0.5 packetCount: 2
```
func (*ICMP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMP.
func (*ICMP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ICMPCheck ¶
type ICMPCheck struct { Description string `yaml:"description" json:"description,omitempty"` Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` ThresholdMillis int64 `yaml:"thresholdMillis" json:"thresholdMillis,omitempty"` PacketLossThreshold int64 `yaml:"packetLossThreshold" json:"packetLossThreshold,omitempty"` PacketCount int `yaml:"packetCount" json:"packetCount,omitempty"` }
func (*ICMPCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ICMPCheck.
func (*ICMPCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ICMPCheck) GetDescription ¶
func (ICMPCheck) GetEndpoint ¶
type LDAP ¶
type LDAP struct {
LDAPCheck `yaml:",inline" json:"inline"`
}
The LDAP check will:
* bind using provided user/password to the ldap host. Supports ldap/ldaps protocols. * search an object type in the provided bind DN.s
```yaml
ldap:
- host: ldap://127.0.0.1:10389 username: uid=admin,ou=system password: secret bindDN: ou=users,dc=example,dc=com userSearch: "(&(objectClass=organizationalPerson))"
- host: ldap://127.0.0.1:10389 username: uid=admin,ou=system password: secret bindDN: ou=groups,dc=example,dc=com userSearch: "(&(objectClass=groupOfNames))"
```
func (*LDAP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAP.
func (*LDAP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LDAPCheck ¶
type LDAPCheck struct { Description string `yaml:"description" json:"description,omitempty"` Host string `yaml:"host" json:"host,omitempty"` Username string `yaml:"username" json:"username,omitempty"` Password string `yaml:"password" json:"password,omitempty"` BindDN string `yaml:"bindDN" json:"bindDN,omitempty"` UserSearch string `yaml:"userSearch" json:"userSearch,omitempty"` SkipTLSVerify bool `yaml:"skipTLSVerify" json:"skipTLSVerify,omitempty"` }
func (*LDAPCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPCheck.
func (*LDAPCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (LDAPCheck) GetDescription ¶
func (LDAPCheck) GetEndpoint ¶
type Namespace ¶
type Namespace struct {
NamespaceCheck `yaml:",inline" json:"inline"`
}
The Namespace check will:
* create a new namespace using the labels/annotations provided
```yaml
namespace:
- namePrefix: "test-name-prefix-" labels: team: test annotations: "foo.baz.com/foo": "bar"
```
func (*Namespace) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Namespace.
func (*Namespace) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceCheck ¶
type NamespaceCheck struct { Description string `yaml:"description" json:"description,omitempty"` CheckName string `yaml:"checkName" json:"checkName,omitempty"` NamespaceNamePrefix string `yaml:"namespaceNamePrefix" json:"namespaceNamePrefix,omitempty"` NamespaceLabels map[string]string `yaml:"namespaceLabels" json:"namespaceLabels,omitempty"` NamespaceAnnotations map[string]string `yaml:"namespaceAnnotations" json:"namespaceAnnotations,omitempty"` PodSpec string `yaml:"podSpec" json:"podSpec,omitempty"` ScheduleTimeout int64 `yaml:"scheduleTimeout" json:"schedule_timeout,omitempty"` ReadyTimeout int64 `yaml:"readyTimeout" json:"readyTimeout,omitempty"` HttpTimeout int64 `yaml:"httpTimeout" json:"httpTimeout,omitempty"` DeleteTimeout int64 `yaml:"deleteTimeout" json:"deleteTimeout,omitempty"` IngressTimeout int64 `yaml:"ingressTimeout" json:"ingressTimeout,omitempty"` HttpRetryInterval int64 `yaml:"httpRetryInterval" json:"httpRetryInterval,omitempty"` Deadline int64 `yaml:"deadline" json:"deadline,omitempty"` Port int64 `yaml:"port" json:"port,omitempty"` Path string `yaml:"path" json:"path,omitempty"` IngressName string `yaml:"ingressName" json:"ingressName,omitempty"` IngressHost string `yaml:"ingressHost" json:"ingressHost,omitempty"` ExpectedContent string `yaml:"expectedContent" json:"expectedContent,omitempty"` ExpectedHttpStatuses []int64 `yaml:"expectedHttpStatuses" json:"expectedHttpStatuses,omitempty"` PriorityClass string `yaml:"priorityClass" json:"priorityClass,omitempty"` }
func (*NamespaceCheck) DeepCopy ¶
func (in *NamespaceCheck) DeepCopy() *NamespaceCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceCheck.
func (*NamespaceCheck) DeepCopyInto ¶
func (in *NamespaceCheck) DeepCopyInto(out *NamespaceCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NamespaceCheck) GetDescription ¶
func (c NamespaceCheck) GetDescription() string
func (NamespaceCheck) GetEndpoint ¶
func (p NamespaceCheck) GetEndpoint() string
func (NamespaceCheck) GetType ¶
func (c NamespaceCheck) GetType() string
func (NamespaceCheck) String ¶
func (p NamespaceCheck) String() string
type Pod ¶
type Pod struct {
PodCheck `yaml:",inline" json:"inline"`
}
```yaml pod:
- name: golang namespace: default spec: | apiVersion: v1 kind: Pod metadata: name: hello-world-golang namespace: default labels: app: hello-world-golang spec: containers:
- name: hello image: quay.io/toni0/hello-webserver-golang:latest port: 8080 path: /foo/bar ingressName: hello-world-golang ingressHost: "hello-world-golang.127.0.0.1.nip.io" scheduleTimeout: 2000 readyTimeout: 5000 httpTimeout: 2000 deleteTimeout: 12000 ingressTimeout: 5000 deadline: 29000 httpRetryInterval: 200 expectedContent: bar expectedHttpStatuses: [200, 201, 202]
```
func (*Pod) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pod.
func (*Pod) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodCheck ¶
type PodCheck struct { Description string `yaml:"description" json:"description,omitempty"` Name string `yaml:"name" json:"name,omitempty"` Namespace string `yaml:"namespace" json:"namespace,omitempty"` Spec string `yaml:"spec" json:"spec,omitempty"` ScheduleTimeout int64 `yaml:"scheduleTimeout" json:"scheduleTimeout,omitempty"` ReadyTimeout int64 `yaml:"readyTimeout" json:"readyTimeout,omitempty"` HttpTimeout int64 `yaml:"httpTimeout" json:"httpTimeout,omitempty"` DeleteTimeout int64 `yaml:"deleteTimeout" json:"deleteTimeout,omitempty"` IngressTimeout int64 `yaml:"ingressTimeout" json:"ingressTimeout,omitempty"` HttpRetryInterval int64 `yaml:"httpRetryInterval" json:"httpRetryInterval,omitempty"` Deadline int64 `yaml:"deadline" json:"deadline,omitempty"` Port int64 `yaml:"port" json:"port,omitempty"` Path string `yaml:"path" json:"path,omitempty"` IngressName string `yaml:"ingressName" json:"ingressName,omitempty"` IngressHost string `yaml:"ingressHost" json:"ingressHost,omitempty"` ExpectedContent string `yaml:"expectedContent" json:"expectedContent,omitempty"` ExpectedHttpStatuses []int `yaml:"expectedHttpStatuses" json:"expectedHttpStatuses,omitempty"` PriorityClass string `yaml:"priorityClass" json:"priorityClass,omitempty"` }
func (*PodCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodCheck.
func (*PodCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PodCheck) GetDescription ¶
func (PodCheck) GetEndpoint ¶
type Postgres ¶
type Postgres struct {
PostgresCheck `yaml:",inline" json:"inline"`
}
This check will try to connect to a specified Postgresql database, run a query against it and verify the results.
```yaml
postgres:
- connection: "user=postgres password=mysecretpassword host=192.168.0.103 port=15432 dbname=postgres sslmode=disable" query: "SELECT 1" results: 1
```
func (*Postgres) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Postgres.
func (*Postgres) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PostgresCheck ¶
type PostgresCheck struct { Description string `yaml:"description" json:"description,omitempty"` Driver string `yaml:"driver" json:"driver,omitempty"` Connection string `yaml:"connection" json:"connection,omitempty"` Query string `yaml:"query" json:"query,omitempty"` Result int `yaml:"results" json:"result,omitempty"` }
func (*PostgresCheck) DeepCopy ¶
func (in *PostgresCheck) DeepCopy() *PostgresCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostgresCheck.
func (*PostgresCheck) DeepCopyInto ¶
func (in *PostgresCheck) DeepCopyInto(out *PostgresCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PostgresCheck) GetDescription ¶
func (c PostgresCheck) GetDescription() string
func (PostgresCheck) GetEndpoint ¶
func (c PostgresCheck) GetEndpoint() string
Obfuscate passwords of the form ' password=xxxxx ' from connectionString since connectionStrings are used as metric labels and we don't want to leak passwords Returns the Connection string with the password replaced by '###'
func (PostgresCheck) GetType ¶
func (c PostgresCheck) GetType() string
func (*PostgresCheck) UnmarshalYAML ¶
func (c *PostgresCheck) UnmarshalYAML(unmarshal func(interface{}) error) error
This is used to supply a default value for unsupplied fields
type S3 ¶
type S3 struct {
S3Check `yaml:",inline" json:"inline"`
}
This check will:
* list objects in the bucket to check for Read permissions * PUT an object into the bucket for Write permissions * download previous uploaded object to check for Get permissions
```yaml
s3:
- buckets:
- name: "test-bucket" region: "us-east-1" endpoint: "https://test-bucket.s3.us-east-1.amazonaws.com" secretKey: "<access-key>" accessKey: "<secret-key>" objectPath: "path/to/object"
```
func (*S3) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3.
func (*S3) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S3Bucket ¶
type S3Bucket struct {
S3BucketCheck `yaml:",inline" json:"inline"`
}
This check will
- search objects matching the provided object path pattern - check that latest object is no older than provided MaxAge value in seconds - check that latest object size is not smaller than provided MinSize value in bytes.
```yaml s3Bucket:
- bucket: foo accessKey: "<access-key>" secretKey: "<secret-key>" region: "us-east-2" endpoint: "https://s3.us-east-2.amazonaws.com" objectPath: "(.*)archive.zip$" readWrite: true maxAge: 5000000 minSize: 50000
```
func (*S3Bucket) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Bucket.
func (*S3Bucket) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S3BucketCheck ¶
type S3BucketCheck struct { Description string `yaml:"description" json:"description,omitempty"` Bucket string `yaml:"bucket" json:"bucket,omitempty"` AccessKey string `yaml:"accessKey" json:"accessKey,omitempty"` SecretKey string `yaml:"secretKey" json:"secretKey,omitempty"` Region string `yaml:"region" json:"region,omitempty"` Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` // glob path to restrict matches to a subset ObjectPath string `yaml:"objectPath" json:"objectPath,omitempty"` ReadWrite bool `yaml:"readWrite" json:"readWrite,omitempty"` // maximum allowed age of matched objects in seconds MaxAge int64 `yaml:"maxAge" json:"maxAge,omitempty"` // min size of of most recent matched object in bytes MinSize int64 `yaml:"minSize" json:"minSize,omitempty"` // Use path style path: http://s3.amazonaws.com/BUCKET/KEY instead of http://BUCKET.s3.amazonaws.com/KEY UsePathStyle bool `yaml:"usePathStyle" json:"usePathStyle,omitempty"` // Skip TLS verify when connecting to s3 SkipTLSVerify bool `yaml:"skipTLSVerify" json:"skipTLSVerify,omitempty"` }
func (*S3BucketCheck) DeepCopy ¶
func (in *S3BucketCheck) DeepCopy() *S3BucketCheck
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3BucketCheck.
func (*S3BucketCheck) DeepCopyInto ¶
func (in *S3BucketCheck) DeepCopyInto(out *S3BucketCheck)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (S3BucketCheck) GetDescription ¶
func (c S3BucketCheck) GetDescription() string
func (S3BucketCheck) GetEndpoint ¶
func (s3 S3BucketCheck) GetEndpoint() string
func (S3BucketCheck) GetType ¶
func (c S3BucketCheck) GetType() string
type S3Check ¶
type S3Check struct { Description string `yaml:"description" json:"description,omitempty"` Bucket Bucket `yaml:"bucket" json:"bucket,omitempty"` AccessKey string `yaml:"accessKey" json:"accessKey,omitempty"` SecretKey string `yaml:"secretKey" json:"secretKey,omitempty"` ObjectPath string `yaml:"objectPath" json:"objectPath,omitempty"` // Skip TLS verify when connecting to s3 SkipTLSVerify bool `yaml:"skipTLSVerify" json:"skipTLSVerify,omitempty"` }
func (*S3Check) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Check.
func (*S3Check) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (S3Check) GetDescription ¶
func (S3Check) GetEndpoint ¶
type SSL ¶
type SSL struct {
SSLCheck `yaml:",inline" json:"inline"`
}
func (*SSL) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSL.
func (*SSL) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SSLCheck ¶
type SSLCheck struct { Description string `yaml:"description" json:"description,omitempty"` // HTTP endpoint to crawl Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` // Maximum number of days until the SSL Certificate expires. MaxSSLExpiry int `yaml:"maxSSLExpiry" json:"maxSSLExpiry,omitempty"` }
func (*SSLCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SSLCheck.
func (*SSLCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (SSLCheck) GetDescription ¶ added in v0.11.4
func (SSLCheck) GetEndpoint ¶ added in v0.11.4
type SrvReply ¶
type SrvReply struct { Target string `yaml:"target,omitempty"` Port int `yaml:"port,omitempty"` Priority int `yaml:"priority,omitempty"` Weight int `yaml:"wight,omitempty"` }
func (*SrvReply) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SrvReply.
func (*SrvReply) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TCP ¶
type TCP struct {
TCPCheck `yaml:",inline" json:"inline"`
}
func (*TCP) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCP.
func (*TCP) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TCPCheck ¶
type TCPCheck struct { Description string `yaml:"description" json:"description,omitempty"` Endpoint string `yaml:"endpoint" json:"endpoint,omitempty"` ThresholdMillis int64 `yaml:"thresholdMillis" json:"thresholdMillis,omitempty"` }
func (*TCPCheck) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPCheck.
func (*TCPCheck) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (TCPCheck) GetDescription ¶ added in v0.11.4
func (TCPCheck) GetEndpoint ¶ added in v0.11.4
type VarSource ¶
type VarSource struct { // Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, // spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. // +optional FieldRef *corev1.ObjectFieldSelector `json:"fieldRef,omitempty" protobuf:"bytes,1,opt,name=fieldRef"` // +optional Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` // Selects a key of a ConfigMap. // +optional ConfigMapKeyRef *corev1.ConfigMapKeySelector `json:"configMapKeyRef,omitempty" protobuf:"bytes,3,opt,name=configMapKeyRef"` // Selects a key of a secret in the pod's namespace // +optional SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty" protobuf:"bytes,4,opt,name=secretKeyRef"` }
VarSource represents a source for a value
func (*VarSource) DeepCopy ¶ added in v0.11.4
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VarSource.
func (*VarSource) DeepCopyInto ¶ added in v0.11.4
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.