Documentation
¶
Index ¶
- func IsBoolSet(s *bool) bool
- func IsStrSet(s *string) bool
- func SanitizeFileName(name string) string
- type AllocationLimits
- type Allocations
- type BasicAuth
- type Config
- func (c *Config) AllowedRegistries() []string
- func (c *Config) CPUResourceLimits() Allocations
- func (c *Config) ExcludeContainer(gvr types.GVR, fqn, co string) bool
- func (c *Config) ExcludeFQN(gvr types.GVR, fqn string, cos []string) bool
- func (c *Config) MEMResourceLimits() Allocations
- func (c *Config) Match(s rules.Spec) bool
- func (c *Config) NodeCPULimit() float64
- func (c *Config) NodeMEMLimit() float64
- func (c *Config) PodCPULimit() float64
- func (c *Config) PodMEMLimit() float64
- func (c *Config) RestartsLimit() int
- func (c *Config) Sections() []string
- type Flags
- type Limits
- type Node
- type Pod
- type Popeye
- type PushGateway
- type Resources
- type S3Info
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeFileName ¶ added in v0.20.0
SanitizeFileName ensure file spec is valid.
Types ¶
type AllocationLimits ¶ added in v0.3.0
type AllocationLimits struct {
CPU Allocations `yaml:"cpu"`
MEM Allocations `yaml:"memory"`
}
AllocationLimits tracks limit thresholds cpu and memory thresholds.
type Allocations ¶ added in v0.3.0
type Allocations struct {
UnderPerc int `yaml:"underPercUtilization"`
OverPerc int `yanl:"overPercUtilization"`
}
Allocations track under/over allocation limits.
type Config ¶
Config tracks Popeye configuration options.
func (*Config) AllowedRegistries ¶ added in v0.10.0
AllowedRegistries tracks allowed docker registries.
func (*Config) CPUResourceLimits ¶ added in v0.3.0
func (c *Config) CPUResourceLimits() Allocations
CPUResourceLimits returns memory over/under allocation thresholds.
func (*Config) ExcludeContainer ¶ added in v0.20.0
func (*Config) ExcludeFQN ¶ added in v0.20.0
func (*Config) MEMResourceLimits ¶ added in v0.3.0
func (c *Config) MEMResourceLimits() Allocations
MEMResourceLimits returns memory over/under allocation thresholds.
func (*Config) NodeCPULimit ¶
NodeCPULimit returns the node cpu threshold if set otherwise the default.
func (*Config) NodeMEMLimit ¶
NodeMEMLimit returns the pod mem threshold if set otherwise the default.
func (*Config) PodCPULimit ¶
PodCPULimit returns the pod cpu threshold if set otherwise the default.
func (*Config) PodMEMLimit ¶
PodMEMLimit returns the pod mem threshold if set otherwise the default.
func (*Config) RestartsLimit ¶
RestartsLimit returns pod restarts limit.
type Flags ¶ added in v0.3.4
type Flags struct {
*genericclioptions.ConfigFlags
PushGateway *PushGateway
S3 *S3Info
LintLevel *string
Output *string
ClearScreen *bool
Save *bool
OutputFile *string
CheckOverAllocs *bool
AllNamespaces *bool
Spinach *string
Sections *[]string
InClusterName *string
StandAlone bool
ActiveNamespace *string
ForceExitZero *bool
MinScore *int
LogLevel *int
LogFile *string
}
Flags represents Popeye CLI flags.
func (*Flags) IsPersistent ¶ added in v0.20.0
func (*Flags) OutputFormat ¶ added in v0.3.4
OutputFormat returns the report output format.
type Popeye ¶
type Popeye struct {
// AllocationLimits tracks global resource allocations.
AllocationLimits `yaml:"allocations"`
// Excludes tracks linter exclusions.
Exclusions rules.Exclusions `yaml:"excludes"`
// Resources tracks cpu/mem limits.
Resources Resources `yaml:"resources"`
// Codes provides to override codes severity.
Overrides rules.Overrides `yaml:"overrides"`
// Registries tracks allowed docker registries.
Registries []string `yaml:"registries"`
}
Popeye tracks Popeye configuration options.
type PushGateway ¶ added in v0.9.1
PushGateway tracks prometheus gateway representations.