Documentation
¶
Index ¶
- Constants
- Variables
- func AddAnnotations(annotations map[string]string, period *common.ScalerPeriod) map[string]string
- func PrepareSearch(ctx context.Context, config *Config) ([]string, metaV1.ListOptions, error)
- func RemoveAnnotations(annotations map[string]string) map[string]string
- func SetNamespaceList(ctx context.Context, config *Config) ([]string, error)
- type Config
- type K8sResource
Constants ¶
View Source
const ( AnnotationsPrefix = "cloudscaler.io" 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 (
DefaultExcludeNamespace = []string{"kube-system"}
)
Functions ¶
func AddAnnotations ¶
func PrepareSearch ¶
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"`
}
type K8sResource ¶
type K8sResource struct {
Config *Config
NsList []string
ListOptions metaV1.ListOptions
}
Click to show internal directories.
Click to hide internal directories.