Documentation ¶
Index ¶
- Constants
- func GetDefaultRateLimiter() flowcontrol.RateLimiter
- func GetRateLimiter(name string) flowcontrol.RateLimiter
- func GetUnattachedRateLimiter() flowcontrol.RateLimiter
- func SetDefaultBurst(q int)
- func SetDefaultQPS(q float32)
- type Client
- type ConfigGetter
- type Factory
- type FakeClientBuilder
- type FakeDataInput
- type ModInterface
- type RESTClientGetter
- type RESTClientOption
Constants ¶
const ( DefaultQPS = rest.DefaultQPS * 3 DefaultBurst = rest.DefaultBurst * 3 )
const Kubeconfig util.EnvironmentVariable = "KUBECONFIG"
Variables ¶
This section is empty.
Functions ¶
func GetDefaultRateLimiter ¶
func GetDefaultRateLimiter() flowcontrol.RateLimiter
func GetRateLimiter ¶
func GetRateLimiter(name string) flowcontrol.RateLimiter
func GetUnattachedRateLimiter ¶
func GetUnattachedRateLimiter() flowcontrol.RateLimiter
func SetDefaultBurst ¶
func SetDefaultBurst(q int)
func SetDefaultQPS ¶
func SetDefaultQPS(q float32)
Types ¶
type Client ¶
type Client interface { Kubernetes() kubernetes.Interface KubernetesExtensions() apiextensionsclient.Interface Arango() versioned.Interface Monitoring() monitoring.Interface Name() string Config() *rest.Config }
func NewFakeClient ¶
func NewFakeClient() Client
func NewStaticClient ¶
func NewStaticClient(kubernetes kubernetes.Interface, kubernetesExtensions apiextensionsclient.Interface, arango versioned.Interface, monitoring monitoring.Interface) Client
type ConfigGetter ¶
func NewStaticConfigGetter ¶
func NewStaticConfigGetter(f func() (*rest.Config, error)) ConfigGetter
type Factory ¶
type Factory interface { SetKubeConfigGetter(getter ConfigGetter) Refresh() error SetClient(c Client) Name() string Client() (Client, bool) }
func GetDefaultFactory ¶
func GetDefaultFactory() Factory
func GetFactory ¶
func GetUnattachedFactory ¶
func GetUnattachedFactory() Factory
type FakeClientBuilder ¶
type FakeClientBuilder interface { Add(objects ...runtime.Object) FakeClientBuilder Version(version *version.Info) FakeClientBuilder Client() Client }
func NewFakeClientBuilder ¶
func NewFakeClientBuilder() FakeClientBuilder
type FakeDataInput ¶
type FakeDataInput struct { Namespace string Pods map[string]*core.Pod Secrets map[string]*core.Secret Services map[string]*core.Service PVCS map[string]*core.PersistentVolumeClaim ServiceAccounts map[string]*core.ServiceAccount PDBSV1 map[string]*policy.PodDisruptionBudget ServiceMonitors map[string]*monitoring.ServiceMonitor ArangoMembers map[string]*api.ArangoMember Nodes map[string]*core.Node ACS map[string]*api.ArangoClusterSynchronization AT map[string]*api.ArangoTask }
func (FakeDataInput) Client ¶
func (f FakeDataInput) Client() Client
type ModInterface ¶
type ModInterface interface { Secrets() generic.ModClient[*core.Secret] Pods() generic.ModClient[*core.Pod] Services() generic.ModClient[*core.Service] ServiceAccounts() generic.ModClient[*core.ServiceAccount] PersistentVolumeClaims() generic.ModClient[*core.PersistentVolumeClaim] PodDisruptionBudgets() generic.ModClient[*policy.PodDisruptionBudget] ServiceMonitors() generic.ModClient[*monitoring.ServiceMonitor] ArangoMembers() generic.ModStatusClient[*api.ArangoMember] }
func NewModInterface ¶
func NewModInterface(client Client, namespace string) ModInterface
type RESTClientGetter ¶
type RESTClientGetter struct {
// contains filtered or unexported fields
}
RESTClientGetter defines the values of a helm REST client.
func NewRESTClientGetter ¶
func NewRESTClientGetter(namespace string, kubeConfig []byte, restConfig *rest.Config, opts ...RESTClientOption) *RESTClientGetter
NewRESTClientGetter returns a RESTClientGetter using the provided 'namespace', 'kubeConfig' and 'restConfig'.
source: https://github.com/helm/helm/issues/6910#issuecomment-601277026
func (*RESTClientGetter) ToDiscoveryClient ¶
func (c *RESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
ToDiscoveryClient returns a CachedDiscoveryInterface that can be used as a discovery client.
func (*RESTClientGetter) ToRESTConfig ¶
func (c *RESTClientGetter) ToRESTConfig() (*rest.Config, error)
ToRESTConfig returns a REST config build from a given kubeconfig
func (*RESTClientGetter) ToRESTMapper ¶
func (c *RESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
func (*RESTClientGetter) ToRawKubeConfigLoader ¶
func (c *RESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
type RESTClientOption ¶
RESTClientOption is a function that can be used to set the RESTClientOptions of a HelmClient.
func Burst ¶
func Burst(v int) RESTClientOption
Maximum burst for throttle the created RESTClient will use DefaultBurst: 100.
func Timeout ¶
func Timeout(d time.Duration) RESTClientOption
Timeout specifies the timeout for a RESTClient as a RESTClientOption. The default (if unspecified) is 32 seconds. See [1] for reference. [^1]: https://github.com/kubernetes/client-go/blob/c6bd30b9ec5f668df191bc268c6f550c37726edb/discovery/discovery_client.go#L52