checks

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCheck

func NewCheck(name, targetType, comment string, optional bool) ks.Check

Types

type CheckFunc added in v1.17.0

type CheckFunc[T any] func(T) (scorecard.TestScore, error)

type Checks

type Checks struct {
	// contains filtered or unexported fields
}

func New

func New(cnf config.Configuration) *Checks

func (*Checks) All

func (c *Checks) All() []ks.Check

func (*Checks) CronJobs

func (c *Checks) CronJobs() map[string]GenCheck[ks.CronJob]

func (*Checks) Deployments

func (c *Checks) Deployments() map[string]GenCheck[appsv1.Deployment]

func (*Checks) HorizontalPodAutoscalers added in v1.2.0

func (c *Checks) HorizontalPodAutoscalers() map[string]GenCheck[ks.HpaTargeter]

func (*Checks) Ingresses

func (c *Checks) Ingresses() map[string]GenCheck[ks.Ingress]

func (*Checks) Metas

func (c *Checks) Metas() map[string]GenCheck[ks.BothMeta]

func (*Checks) NetworkPolicies

func (c *Checks) NetworkPolicies() map[string]GenCheck[networkingv1.NetworkPolicy]

func (*Checks) PodDisruptionBudgets added in v1.13.0

func (c *Checks) PodDisruptionBudgets() map[string]GenCheck[ks.PodDisruptionBudget]

func (*Checks) Pods

func (c *Checks) Pods() map[string]GenCheck[ks.PodSpecer]

func (*Checks) RegisterCronJobCheck

func (c *Checks) RegisterCronJobCheck(name, comment string, fn CheckFunc[ks.CronJob])

func (*Checks) RegisterDeploymentCheck

func (c *Checks) RegisterDeploymentCheck(name, comment string, fn CheckFunc[appsv1.Deployment])

func (*Checks) RegisterHorizontalPodAutoscalerCheck added in v1.2.0

func (c *Checks) RegisterHorizontalPodAutoscalerCheck(name, comment string, fn CheckFunc[ks.HpaTargeter])

func (*Checks) RegisterIngressCheck

func (c *Checks) RegisterIngressCheck(name, comment string, fn CheckFunc[ks.Ingress])

func (*Checks) RegisterMetaCheck

func (c *Checks) RegisterMetaCheck(name, comment string, fn CheckFunc[ks.BothMeta])

func (*Checks) RegisterNetworkPolicyCheck

func (c *Checks) RegisterNetworkPolicyCheck(name, comment string, fn CheckFunc[networkingv1.NetworkPolicy])

func (*Checks) RegisterOptionalCronJobCheck added in v1.1.0

func (c *Checks) RegisterOptionalCronJobCheck(name, comment string, fn CheckFunc[ks.CronJob])

func (*Checks) RegisterOptionalDeploymentCheck added in v1.1.0

func (c *Checks) RegisterOptionalDeploymentCheck(name, comment string, fn CheckFunc[appsv1.Deployment])

func (*Checks) RegisterOptionalHorizontalPodAutoscalerCheck added in v1.2.0

func (c *Checks) RegisterOptionalHorizontalPodAutoscalerCheck(name, comment string, fn CheckFunc[ks.HpaTargeter])

func (*Checks) RegisterOptionalIngressCheck added in v1.1.0

func (c *Checks) RegisterOptionalIngressCheck(name, comment string, fn CheckFunc[ks.Ingress])

func (*Checks) RegisterOptionalMetaCheck added in v1.1.0

func (c *Checks) RegisterOptionalMetaCheck(name, comment string, fn CheckFunc[ks.BothMeta])

func (*Checks) RegisterOptionalNetworkPolicyCheck added in v1.1.0

func (c *Checks) RegisterOptionalNetworkPolicyCheck(name, comment string, fn CheckFunc[networkingv1.NetworkPolicy])

func (*Checks) RegisterOptionalPodCheck added in v1.1.0

func (c *Checks) RegisterOptionalPodCheck(name, comment string, fn CheckFunc[ks.PodSpecer])

func (*Checks) RegisterOptionalServiceCheck added in v1.1.0

func (c *Checks) RegisterOptionalServiceCheck(name, comment string, fn CheckFunc[corev1.Service])

func (*Checks) RegisterOptionalStatefulSetCheck added in v1.1.0

func (c *Checks) RegisterOptionalStatefulSetCheck(name, comment string, fn CheckFunc[appsv1.StatefulSet])

func (*Checks) RegisterPodCheck

func (c *Checks) RegisterPodCheck(name, comment string, fn CheckFunc[ks.PodSpecer])

func (*Checks) RegisterPodDisruptionBudgetCheck added in v1.13.0

func (c *Checks) RegisterPodDisruptionBudgetCheck(name, comment string, fn CheckFunc[ks.PodDisruptionBudget])

func (*Checks) RegisterServiceCheck

func (c *Checks) RegisterServiceCheck(name, comment string, fn CheckFunc[corev1.Service])

func (*Checks) RegisterStatefulSetCheck

func (c *Checks) RegisterStatefulSetCheck(name, comment string, fn CheckFunc[appsv1.StatefulSet])

func (*Checks) Services

func (c *Checks) Services() map[string]GenCheck[corev1.Service]

func (*Checks) StatefulSets

func (c *Checks) StatefulSets() map[string]GenCheck[appsv1.StatefulSet]

type GenCheck added in v1.17.0

type GenCheck[T any] struct {
	ks.Check
	Fn CheckFunc[T]
}

type MetaCheck

type MetaCheck struct {
	ks.Check
	Fn MetaCheckFn
}

type MetaCheckFn added in v1.1.0

type MetaCheckFn = func(ks.BothMeta) scorecard.TestScore

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL