utils

package
v0.13.0-rc-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package utils define some common used functions&structs

Package utils define some common used functions&structs

Index

Constants

This section is empty.

Variables

View Source
var EnableInitContainers = false
View Source
var (
	// GroupVersionsVPA is a list of group versions for vertical pod autoscaler
	// It should be updated when the watched crd use a new version
	GroupVersionsVPA = []string{"autoscaling.k8s.io/v1"}
)

Functions

This section is empty.

Types

type GroupVersions

type GroupVersions map[string]bool

GroupVersions is a set of Kubernetes API group versions.

func GetGroupVersions

func GetGroupVersions(client discovery.ServerGroupsInterface) (GroupVersions, error)

GetGroupVersions will get all group versions in the cluster

func (GroupVersions) Has

func (v GroupVersions) Has(apiVersion string) bool

Has returns true if the version string is in the set.

vs.Has("apps/v1")

func (GroupVersions) HasGroupVersions

func (v GroupVersions) HasGroupVersions(versions []string) bool

HasGroupVersions returns true if the versions are both in the set

type WatchFlags

type WatchFlags struct {
	// the controller should not watch VPA CRDs if WatchVPACRDs is false
	WatchVPACRDs bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL