kube

package
v0.32.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Copyright 2014 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	// KubeconfigDataName is the key used to store a Kubeconfig in the secret's data field.
	KubeconfigDataName = "value"
	// Kubeconfig is the secret name suffix storing the Cluster Kubeconfig.
	Kubeconfig = Purpose("kubeconfig")
	// UserKubeconfig is the secret name suffix storing the Cluster Kubeconfig for user usage.
	UserKubeconfig = Purpose("user-kubeconfig")
)

Variables

This section is empty.

Functions

func GetInternalKubeconfig added in v0.21.0

func GetInternalKubeconfig(ctx context.Context, c client.Reader, cluster client.ObjectKey) ([]byte, error)

func GetKubeconfig added in v0.21.0

func GetKubeconfig(ctx context.Context, c client.Reader, cluster client.ObjectKey) ([]byte, error)

func NewClusterClient added in v0.18.9

func NewClusterClient(ctx context.Context, c client.Client, name, namespace string) (client.Client, error)

func NewClusterConfig added in v0.21.0

func NewClusterConfig(ctx context.Context, c client.Client, name, namespace string) (*rest.Config, error)

func NewInClusterRESTClientGetter

func NewInClusterRESTClientGetter(cfg *rest.Config, namespace string) genericclioptions.RESTClientGetter

func NewMemoryRESTClientGetter

func NewMemoryRESTClientGetter(kubeConfig []byte, namespace string) genericclioptions.RESTClientGetter

func NewProxyHandler added in v0.21.0

func NewProxyHandler(apiProxyPrefix string, cfg *rest.Config, keepalive time.Duration) (http.Handler, error)

NewProxyHandler creates an api proxy handler for the cluster

Types

type MemoryRESTClientGetter

type MemoryRESTClientGetter struct {
	// contains filtered or unexported fields
}

MemoryRESTClientGetter is an implementation of the genericclioptions.RESTClientGetter, capable of working with an in-memory kubeconfig file.

func (*MemoryRESTClientGetter) ToDiscoveryClient

func (*MemoryRESTClientGetter) ToRESTConfig

func (c *MemoryRESTClientGetter) ToRESTConfig() (*rest.Config, error)

func (*MemoryRESTClientGetter) ToRESTMapper

func (c *MemoryRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)

func (*MemoryRESTClientGetter) ToRawKubeConfigLoader

func (c *MemoryRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig

type Purpose added in v0.21.0

type Purpose string

Purpose is the name to append to the secret generated for a cluster.

Jump to

Keyboard shortcuts

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