Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { HasDefaultRequest bool HasDefaultLimit bool HasMaxLimitRequestRatio bool DefaultLimit resource.Quantity DefaultRequest resource.Quantity MaxLimitRequestRatio resource.Quantity }
func NewConfig ¶
func NewConfig(lri corev1.LimitRangeItem, resource corev1.ResourceName) Config
type LimitRange ¶
type LimitRange struct {
// contains filtered or unexported fields
}
LimitRange provides an implementation of the LimitRanger interface defined in admission. This implementation is designed to provider a generic config sourcing tool for all mutation handlers.
func NewLimitRanger ¶
func NewLimitRanger(lister corev1Listers.LimitRangeLister) *LimitRange
NewLimitRanger take a limitrangelister and returns a pointer to a configured LimitRange. This satisfies the LimitRanger interface
func (*LimitRange) LimitRangeConfig ¶
func (lr *LimitRange) LimitRangeConfig(namespace string) (*Config, error)
LimitRangeConfig takes a namespace string and returns a Config for memory or a nil if no limit range of type Container is found in the namespace. It returns a non-nil error if there is an error sourcing data from the cluster api or the namespace name is empty
type LimitRangeContextType ¶
type LimitRangeContextType string
const LimitRangeContextTypeMemory LimitRangeContextType = "memory"
Click to show internal directories.
Click to hide internal directories.