Documentation ¶
Index ¶
- Constants
- Variables
- func AddBoolAnnotations(annot map[string]string, curPeriod *periodPkg.Period, value bool) map[string]string
- func AddIntAnnotations(annot map[string]string, curPeriod *periodPkg.Period, value *int32) map[string]string
- func PrepareSearch(ctx context.Context, config *Config) ([]string, metaV1.ListOptions, error)
- func RemoveAnnotations(annotations map[string]string) map[string]string
- func RestoreBool(annot map[string]string) (*bool, map[string]string, error)
- func RestoreInt(annot map[string]string) (*int32, map[string]string, error)
- func SetNamespaceList(ctx context.Context, config *Config) ([]string, error)
- type Config
- type K8sResource
Constants ¶
View Source
const ( AnnotationsPrefix = "cloudscaler.io" AnnotationsOrigValue = "original-value" NominalMinReplicas = "nominal-min-replicas" NominalMaxReplicas = "nominal-max-replicas" PeriodType = "period-type" PeriodStartTime = "period-start-time" PeriodEndTime = "period-end-time" PeriodTimezone = "period-timezone" )
Variables ¶
View Source
var (
DefaultExcludeNamespaces = []string{"kube-system"}
)
Functions ¶
func AddBoolAnnotations ¶ added in v1.2.0
func AddIntAnnotations ¶ added in v1.2.0
func PrepareSearch ¶
func RestoreBool ¶ added in v1.2.0
func RestoreInt ¶ added in v1.2.0
Types ¶
type Config ¶
type Config struct { Namespaces []string `json:"namespaces,omitempty"` ExcludeNamespaces []string `json:"excludeNamespaces,omitempty"` Client *kubernetes.Clientset `json:"client"` LabelSelector *metaV1.LabelSelector `json:"labelSelector,omitempty"` Period *periodPkg.Period `json:"period,omitempty"` ForceExcludeSystemNamespaces bool `json:"forceExcludeSystemNamespaces,omitempty"` }
type K8sResource ¶
type K8sResource struct { NsList []string ListOptions metaV1.ListOptions Period *periodPkg.Period `json:"period,omitempty"` }
func InitConfig ¶ added in v1.0.3
func InitConfig(ctx context.Context, config *Config) (*K8sResource, error)
Click to show internal directories.
Click to hide internal directories.