Documentation ¶
Index ¶
Constants ¶
const ( SerializedReadSingleTarget CheckName = "SerializedReadSingleTarget" QuorumReadSingleTarget CheckName = "QuorumReadSingleTarget" GRPCReadySingleTarget CheckName = "GRPCReadySingleTarget" QuorumRead CheckName = "QuorumRead" DefaultSlowRequestDuration = 500 * time.Millisecond DefaultContextDeadline = 1 * time.Second DefaultNamespaceKey = "/kubernetes.io/namespaces/default" )
const ( StdErrLogOutput = "stderr" StdOutLogOutput = "stdout" )
Variables ¶
var (
ErrLogRotationInvalidLogOutput = fmt.Errorf("--log-outputs requires a single file path when --log-rotate-config-json is defined")
)
Functions ¶
func GetZapLogger ¶
func LoglevelToZap ¶
Types ¶
type Check ¶
type Check struct { Probe CheckFunc // contains filtered or unexported fields }
func (*Check) LogTermination ¶
func (c *Check) LogTermination()
type CheckFunc ¶
func WithGRPCReadySingleTarget ¶
func WithGRPCReadySingleTarget() CheckFunc
WithGRPCReadySingleTarget performs a gRPC dial to the endpoint and checks if the service is "Ready". This check ensures that the target subconn will be considered usable by the etcd client balancer for round robin requests. Ready does not preclude quorum.
func WithQuorumRead ¶
func WithQuorumRead() CheckFunc
WithQuorumRead performs a quorate RangeRequest against all targets. This check ensures given an etcd client with multiple endpoint targets the client balancer can provide linearized read/write service to the apiserver.
func WithQuorumReadSingleTarget ¶
func WithQuorumReadSingleTarget() CheckFunc
WithQuorumReadSingleTarget performs a quorate RangeRequest against a single target. This check is useful to understand exact timings on quorate availability on a per peer level. This single target test can fail on a minority of peer targets while WithQuorumRead passes. This can happen most commonly on node reboot during upgrades or during a static-pod rollout. But can also happen less during a network partition.
func WithSerializedReadSingleTarget ¶
func WithSerializedReadSingleTarget() CheckFunc
WithSerializedReadSingleTarget performs a serialized RangeRequest against a single target. This test is of lower overall importance because linearized read/write are the default for kubernetes. But some requests will not fail if quorum is not established. Examples include WatchRequest that does no pass WithRequireLeader, DefragmentRequest, HashKVRequest and MemberList (3.4 and earlier).
type CheckStatus ¶
type CheckStatus struct {
// contains filtered or unexported fields
}
type CheckTarget ¶
type CheckTarget string
type LogLine ¶
type LogLine struct { Level string `json:"level"` UnixTS string `json:"ts"` Caller string `json:"caller,omitempty"` Message string `json:"msg"` Pod string `json:"pod,omitempty"` DisruptionStart string `json:"start,omitempty"` DisruptionEnd string `json:"end,omitempty"` Duration string `json:"duration,omitempty"` Check string `json:"check,omitempty"` }