Documentation ¶
Index ¶
- func AuthMethodFromPrivateKey(key string) (ssh.AuthMethod, error)
- func AuthMethodFromPrivateKeyFile(file string) (ssh.AuthMethod, error)
- func DirExistAndReadable(name string) bool
- func FileExistAndReadable(name string) bool
- func FileExists(name string) bool
- func LocalStoragePodFilter(p apiv1.Pod) (bool, error)
- func MaxInt(x, y int) int
- func MaxInt64(x, y int64) int64
- func MergeKubernetesLabel(labels ...types.KubernetesLabel) types.KubernetesLabel
- func MinInt(x, y int) int
- func MinInt64(x, y int64) int64
- func MirrorPodFilter(p apiv1.Pod) (bool, error)
- func NewDaemonSetPodFilter(ctx context.Context, client kubernetes.Interface) types.PodFilterFunc
- func NewPodFilters(filters ...types.PodFilterFunc) types.PodFilterFunc
- func NewRequestContext(requestTimeout time.Duration) *context.Context
- func NewStatefulSetPodFilter(ctx context.Context, client kubernetes.Interface) types.PodFilterFunc
- func NodeFromJSON(s string) (*apiv1.Node, error)
- func PollImmediate(interval, timeout time.Duration, condition wait.ConditionFunc) error
- func Scp(connect *types.AutoScalerServerSSH, host, src, dst string) error
- func Shell(args ...string) error
- func ShouldTestFeature(name string) bool
- func Sudo(connect *types.AutoScalerServerSSH, host string, ...) (string, error)
- func ToJSON(v interface{}) string
- func ToYAML(v interface{}) string
- func UnprotectedPodFilter(annotations ...string) types.PodFilterFunc
- func UnreplicatedPodFilter(p apiv1.Pod) (bool, error)
- func Values[M ~map[K]V, K comparable, V any](m M) []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMethodFromPrivateKey ¶
func AuthMethodFromPrivateKey(key string) (ssh.AuthMethod, error)
AuthMethodFromPrivateKey read public key
func AuthMethodFromPrivateKeyFile ¶
func AuthMethodFromPrivateKeyFile(file string) (ssh.AuthMethod, error)
AuthMethodFromPrivateKeyFile read public key
func DirExistAndReadable ¶ added in v1.25.6
func FileExistAndReadable ¶ added in v1.25.6
func LocalStoragePodFilter ¶ added in v1.20.5
LocalStoragePodFilter returns true if the supplied pod does not have local storage, i.e. does not use any 'empty dir' volumes.
func MergeKubernetesLabel ¶ added in v1.24.6
func MergeKubernetesLabel(labels ...types.KubernetesLabel) types.KubernetesLabel
MergeKubernetesLabel merge kubernetes map in one
func MirrorPodFilter ¶ added in v1.20.5
MirrorPodFilter returns true if the supplied pod is not a mirror pod, i.e. a pod created by a manifest on the node rather than the API server.
func NewDaemonSetPodFilter ¶ added in v1.20.5
func NewDaemonSetPodFilter(ctx context.Context, client kubernetes.Interface) types.PodFilterFunc
NewDaemonSetPodFilter returns a FilterFunc that returns true if the supplied pod is not managed by an extant DaemonSet.
func NewPodFilters ¶ added in v1.20.5
func NewPodFilters(filters ...types.PodFilterFunc) types.PodFilterFunc
NewPodFilters returns a FilterFunc that returns true if all of the supplied FilterFuncs return true.
func NewRequestContext ¶ added in v1.21.8
func NewStatefulSetPodFilter ¶ added in v1.20.5
func NewStatefulSetPodFilter(ctx context.Context, client kubernetes.Interface) types.PodFilterFunc
NewStatefulSetPodFilter returns a FilterFunc that returns true if the supplied pod is not managed by an extant StatefulSet.
func NodeFromJSON ¶
NodeFromJSON deserialize a string to apiv1.Node
func PollImmediate ¶ added in v1.25.6
func PollImmediate(interval, timeout time.Duration, condition wait.ConditionFunc) error
func ShouldTestFeature ¶ added in v1.25.5
ShouldTestFeature check if test must be done
func Sudo ¶
func Sudo(connect *types.AutoScalerServerSSH, host string, timeoutInSeconds time.Duration, command ...string) (string, error)
Sudo exec ssh command as sudo
func UnprotectedPodFilter ¶ added in v1.20.5
func UnprotectedPodFilter(annotations ...string) types.PodFilterFunc
UnprotectedPodFilter returns a FilterFunc that returns true if the supplied pod does not have any of the user-specified annotations for protection from eviction
func UnreplicatedPodFilter ¶ added in v1.20.5
UnreplicatedPodFilter returns true if the pod is replicated, i.e. is managed by a controller (deployment, daemonset, statefulset, etc) of some sort.
func Values ¶ added in v1.25.6
func Values[M ~map[K]V, K comparable, V any](m M) []V
Values returns the values of the map m. The values will be in an indeterminate order.
Types ¶
This section is empty.