popeye: github.com/derailed/popeye/internal/scrub Index | Files

package scrub

import "github.com/derailed/popeye/internal/scrub"

Index

Package Files

cache.go cache_apps.go cache_core.go cache_ext.go cache_mx.go cache_policy.go cache_rbac.go cluster.go cm.go cr.go crb.go dp.go ds.go hpa.go ing.go no.go np.go ns.go pdb.go pod.go psp.go pv.go pvc.go rb.go ro.go rs.go sa.go sec.go sts.go svc.go types.go

type Cache Uses

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

Cache tracks commonly used resources.

func NewCache Uses

func NewCache(f types.Factory, cfg *config.Config) *Cache

NewCache returns a new resource cache

type Cluster Uses

type Cluster struct {
    *issues.Collector
    *cache.Cluster
    *config.Config
    // contains filtered or unexported fields
}

Cluster represents a Cluster scruber.

func (*Cluster) Sanitize Uses

func (d *Cluster) Sanitize(ctx context.Context) error

Sanitize all available Clusters.

type ClusterRole Uses

type ClusterRole struct {
    *config.Config
    *issues.Collector

    *cache.ClusterRole
    *cache.ClusterRoleBinding
    *cache.RoleBinding
    // contains filtered or unexported fields
}

ClusterRole represents a ClusterRole scruber.

func (*ClusterRole) Sanitize Uses

func (c *ClusterRole) Sanitize(ctx context.Context) error

Sanitize all available ClusterRoles.

type ClusterRoleBinding Uses

type ClusterRoleBinding struct {
    *config.Config
    *issues.Collector

    *cache.ClusterRoleBinding
    *cache.ClusterRole
    *cache.Role
    // contains filtered or unexported fields
}

ClusterRoleBinding represents a ClusterRoleBinding scruber.

func (*ClusterRoleBinding) Sanitize Uses

func (c *ClusterRoleBinding) Sanitize(ctx context.Context) error

Sanitize all available ClusterRoleBindings.

type Collector Uses

type Collector interface {
    MaxSeverity(res string) config.Level
    Outcome() issues.Outcome
}

Collector collects sanitization issues.

type ConfigMap Uses

type ConfigMap struct {
    *issues.Collector
    *cache.Pod
    *cache.ConfigMap
}

ConfigMap represents a configMap scruber.

func (*ConfigMap) Sanitize Uses

func (c *ConfigMap) Sanitize(ctx context.Context) error

Sanitize all available ConfigMaps.

type DaemonSet Uses

type DaemonSet struct {
    *issues.Collector
    *cache.DaemonSet
    *cache.PodsMetrics
    *cache.Pod
    *cache.ServiceAccount
    *config.Config
    // contains filtered or unexported fields
}

DaemonSet represents a DaemonSet scruber.

func (*DaemonSet) Sanitize Uses

func (d *DaemonSet) Sanitize(ctx context.Context) error

Sanitize all available DaemonSets.

type Deployment Uses

type Deployment struct {
    *issues.Collector
    *cache.Deployment
    *cache.PodsMetrics
    *cache.Pod
    *cache.ServiceAccount
    *config.Config
    // contains filtered or unexported fields
}

Deployment represents a Deployment scruber.

func (*Deployment) Sanitize Uses

func (d *Deployment) Sanitize(ctx context.Context) error

Sanitize all available Deployments.

type HorizontalPodAutoscaler Uses

type HorizontalPodAutoscaler struct {
    *issues.Collector
    *cache.HorizontalPodAutoscaler
    *cache.Pod
    *cache.Node
    *cache.PodsMetrics
    *cache.NodesMetrics
    *cache.Deployment
    *cache.StatefulSet
    *cache.ServiceAccount
    *config.Config
}

HorizontalPodAutoscaler represents a HorizontalPodAutoscaler scruber.

func (*HorizontalPodAutoscaler) Sanitize Uses

func (h *HorizontalPodAutoscaler) Sanitize(ctx context.Context) error

Sanitize all available HorizontalPodAutoscalers.

type Ingress Uses

type Ingress struct {
    *issues.Collector
    *cache.Ingress
    *config.Config
    // contains filtered or unexported fields
}

Ingress represents a Ingress scruber.

func (*Ingress) Sanitize Uses

func (i *Ingress) Sanitize(ctx context.Context) error

Sanitize all available Ingresss.

type Namespace Uses

type Namespace struct {
    *issues.Collector
    *cache.Namespace
    *cache.Pod
}

Namespace represents a Namespace scruber.

func (*Namespace) ReferencedNamespaces Uses

func (n *Namespace) ReferencedNamespaces(res map[string]struct{})

ReferencedNamespaces fetch all namespaces referenced by pods.

func (*Namespace) Sanitize Uses

func (n *Namespace) Sanitize(ctx context.Context) error

Sanitize all available Namespaces.

type NetworkPolicy Uses

type NetworkPolicy struct {
    *issues.Collector
    *cache.NetworkPolicy
    *cache.Namespace
    *cache.Pod
    *config.Config
    // contains filtered or unexported fields
}

NetworkPolicy represents a NetworkPolicy scruber.

func (*NetworkPolicy) Sanitize Uses

func (n *NetworkPolicy) Sanitize(ctx context.Context) error

Sanitize all available NetworkPolicys.

type Node Uses

type Node struct {
    *issues.Collector
    *cache.Node
    *cache.Pod
    *cache.NodesMetrics
    *config.Config
}

Node represents a Node scruber.

func (*Node) Sanitize Uses

func (n *Node) Sanitize(ctx context.Context) error

Sanitize all available Nodes.

type PersistentVolume Uses

type PersistentVolume struct {
    *issues.Collector
    *cache.PersistentVolume
    *cache.Pod
}

PersistentVolume represents a PersistentVolume scruber.

func (*PersistentVolume) Sanitize Uses

func (s *PersistentVolume) Sanitize(ctx context.Context) error

Sanitize all available PersistentVolumes.

type PersistentVolumeClaim Uses

type PersistentVolumeClaim struct {
    *issues.Collector
    *cache.PersistentVolumeClaim
    *cache.Pod
}

PersistentVolumeClaim represents a PersistentVolumeClaim scruber.

func (*PersistentVolumeClaim) Sanitize Uses

func (s *PersistentVolumeClaim) Sanitize(ctx context.Context) error

Sanitize all available PersistentVolumeClaims.

type Pod Uses

type Pod struct {
    *issues.Collector
    *cache.Pod
    *cache.PodsMetrics
    *config.Config
    *cache.PodDisruptionBudget
}

Pod represents a Pod scruber.

func (*Pod) Sanitize Uses

func (p *Pod) Sanitize(ctx context.Context) error

Sanitize all available Pods.

type PodDisruptionBudget Uses

type PodDisruptionBudget struct {
    *issues.Collector
    *cache.Pod
    *cache.PodDisruptionBudget
}

PodDisruptionBudget represents a pdb scruber.

func (*PodDisruptionBudget) Sanitize Uses

func (c *PodDisruptionBudget) Sanitize(ctx context.Context) error

Sanitize all available PodDisruptionBudgets.

type PodSecurityPolicy Uses

type PodSecurityPolicy struct {
    *issues.Collector
    *cache.PodSecurityPolicy
    *config.Config
    // contains filtered or unexported fields
}

PodSecurityPolicy represents a PodSecurityPolicy scruber.

func (*PodSecurityPolicy) Sanitize Uses

func (p *PodSecurityPolicy) Sanitize(ctx context.Context) error

Sanitize all available PodSecurityPolicys.

type ReplicaSet Uses

type ReplicaSet struct {
    *issues.Collector
    *cache.ReplicaSet
    *cache.Pod
    *config.Config
    // contains filtered or unexported fields
}

ReplicaSet represents a ReplicaSet scruber.

func (*ReplicaSet) Sanitize Uses

func (d *ReplicaSet) Sanitize(ctx context.Context) error

Sanitize all available ReplicaSets.

type Role Uses

type Role struct {
    *config.Config
    *issues.Collector

    *cache.Role
    *cache.ClusterRoleBinding
    *cache.RoleBinding
    // contains filtered or unexported fields
}

Role represents a Role scruber.

func (*Role) Sanitize Uses

func (c *Role) Sanitize(ctx context.Context) error

Sanitize all available Roles.

type RoleBinding Uses

type RoleBinding struct {
    *config.Config
    *issues.Collector

    *cache.RoleBinding
    *cache.ClusterRole
    *cache.Role
    // contains filtered or unexported fields
}

RoleBinding represents a RoleBinding scruber.

func (*RoleBinding) Sanitize Uses

func (c *RoleBinding) Sanitize(ctx context.Context) error

Sanitize all available RoleBindings.

type Sanitizer Uses

type Sanitizer interface {
    Collector
    Sanitize(context.Context) error
}

Sanitizer represents a resource sanitizer.

func NewCluster Uses

func NewCluster(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewCluster return a new Cluster scruber.

func NewClusterRole Uses

func NewClusterRole(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewClusterRole return a new ClusterRole scruber.

func NewClusterRoleBinding Uses

func NewClusterRoleBinding(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewClusterRoleBinding return a new ClusterRoleBinding scruber.

func NewConfigMap Uses

func NewConfigMap(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewConfigMap return a new ConfigMap scruber.

func NewDaemonSet Uses

func NewDaemonSet(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewDaemonSet return a new DaemonSet scruber.

func NewDeployment Uses

func NewDeployment(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewDeployment return a new Deployment scruber.

func NewHorizontalPodAutoscaler Uses

func NewHorizontalPodAutoscaler(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewHorizontalPodAutoscaler return a new HorizontalPodAutoscaler scruber.

func NewIngress Uses

func NewIngress(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewIngress return a new Ingress scruber.

func NewNamespace Uses

func NewNamespace(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewNamespace return a new Namespace scruber.

func NewNetworkPolicy Uses

func NewNetworkPolicy(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewNetworkPolicy return a new NetworkPolicy scruber.

func NewNode Uses

func NewNode(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewNode return a new Node scruber.

func NewPersistentVolume Uses

func NewPersistentVolume(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewPersistentVolume return a new PersistentVolume scruber.

func NewPersistentVolumeClaim Uses

func NewPersistentVolumeClaim(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewPersistentVolumeClaim return a new PersistentVolumeClaim scruber.

func NewPod Uses

func NewPod(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewPod return a new Pod scruber.

func NewPodDisruptionBudget Uses

func NewPodDisruptionBudget(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewPodDisruptionBudget return a new PodDisruptionBudget scruber.

func NewPodSecurityPolicy Uses

func NewPodSecurityPolicy(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewPodSecurityPolicy return a new PodSecurityPolicy scruber.

func NewReplicaSet Uses

func NewReplicaSet(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewReplicaSet return a new ReplicaSet scruber.

func NewRole Uses

func NewRole(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewRole return a new Role scruber.

func NewRoleBinding Uses

func NewRoleBinding(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewRoleBinding return a new RoleBinding scruber.

func NewSecret Uses

func NewSecret(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewSecret return a new Secret scruber.

func NewService Uses

func NewService(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewService return a new Service scruber.

func NewServiceAccount Uses

func NewServiceAccount(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewServiceAccount return a new ServiceAccount scruber.

func NewStatefulSet Uses

func NewStatefulSet(ctx context.Context, c *Cache, codes *issues.Codes) Sanitizer

NewStatefulSet return a new StatefulSet scruber.

type Secret Uses

type Secret struct {
    *issues.Collector
    *cache.Secret
    *cache.Pod
    *cache.ServiceAccount
    *cache.Ingress
}

Secret represents a Secret scruber.

func (*Secret) Sanitize Uses

func (c *Secret) Sanitize(ctx context.Context) error

Sanitize all available Secrets.

type Service Uses

type Service struct {
    *issues.Collector
    *cache.Service
    *cache.Pod
    *cache.Endpoints
}

Service represents a Service scruber.

func (*Service) Sanitize Uses

func (s *Service) Sanitize(ctx context.Context) error

Sanitize all available Services.

type ServiceAccount Uses

type ServiceAccount struct {
    *issues.Collector
    *cache.ServiceAccount
    *cache.Pod
    *cache.ClusterRoleBinding
    *cache.RoleBinding
    *cache.Secret
    *cache.Ingress
}

ServiceAccount represents a ServiceAccount scruber.

func (*ServiceAccount) Sanitize Uses

func (s *ServiceAccount) Sanitize(ctx context.Context) error

Sanitize all available ServiceAccounts.

type StatefulSet Uses

type StatefulSet struct {
    *issues.Collector
    *cache.Pod
    *cache.StatefulSet
    *cache.PodsMetrics
    *cache.ServiceAccount
    *config.Config
}

StatefulSet represents a StatefulSet scruber.

func (*StatefulSet) Sanitize Uses

func (c *StatefulSet) Sanitize(ctx context.Context) error

Sanitize all available StatefulSets.

Package scrub imports 11 packages (graph) and is imported by 1 packages. Updated 2020-08-13. Refresh now. Tools for package owners.