Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { CfgNamespace string *kubernetes.Clientset }
Client defines the K8s client.
func NewClient ¶
func NewClient(configFlags *genericclioptions.ConfigFlags) (*Client, error)
NewClient returns a K8s client configured with ConfigFlags. ConfigFlags compose the set of values necessary for obtaining K8s REST client config.
type QueryResult ¶
type QueryResult struct {
// contains filtered or unexported fields
}
QueryResult defines the result of a K8s Services query.
func (QueryResult) LivenessHit ¶
func (qr QueryResult) LivenessHit() bool
LivenessHit returns whether a query result found a K8s Service that can expose HTTP Get liveness Probes.
func (QueryResult) QueriedServiceName ¶
func (qr QueryResult) QueriedServiceName() string
QueriedServiceName returns a query result's queried service name.
func (QueryResult) QueryHit ¶
func (qr QueryResult) QueryHit() bool
QueryHit returns whether a query result found a K8s Service.
func (QueryResult) SelectionServiceName ¶
func (qr QueryResult) SelectionServiceName() string
SelectionServiceName returns a K8s Service name for a service + pod selection.
func (QueryResult) ServiceProbes ¶
func (qr QueryResult) ServiceProbes() ServiceProbes
ServiceProbes returns a K8s Service's exposed HTTP Get liveness Probes for a query result based on a service + pod selection.
type QueryResults ¶
type QueryResults []QueryResult
QueryResults defines a list query results.
func DoQuery ¶
DoQuery queries a K8s cluster for K8s services using specified service names and namespace. It returns a list of query results, one for each found and missed service name.
func (QueryResults) HasLivenessHits ¶
func (r QueryResults) HasLivenessHits() bool
HasLivenessHits returns whether any K8s Services can expose any HTTP Get liveness probes.
func (QueryResults) HasQueryHits ¶
func (r QueryResults) HasQueryHits() bool
HasQueryHits returns whether there are any query results found matching any K8s Services.
func (QueryResults) LivenessHits ¶
func (r QueryResults) LivenessHits() QueryResults
LivenessHits returns any K8s Services that DO EXIST AND can expose any HTTP Get liveness probes.
func (QueryResults) LivenessMisses ¶
func (r QueryResults) LivenessMisses() QueryResults
LivenessMisses return any K8s Services do exist BUT CANNOT expose any HTTP Get liveness probes.
func (QueryResults) QueryMisses ¶
func (r QueryResults) QueryMisses() QueryResults
QueryMisses returns any K8s Services that could not be found.
type Selection ¶
Selection a selection pairs a K8s Service and a Pod based on a Service's selector labels.
func (Selection) ServiceProbes ¶
func (s Selection) ServiceProbes() ServiceProbes
ServiceProbes returns Pod HTTP Get liveness probes that a Service can expose using one of it's configured ports.
type ServiceProbe ¶
type ServiceProbe struct { Url *url.URL HTTPGets []*corev1.HTTPGetAction }
ServiceProbe is a list of HTTP Get liveness probes for a K8s Service.
type ServiceProbes ¶
type ServiceProbes []ServiceProbe