kube

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Copyright 2020-2021 The UnDistro 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

View Source
var ErrConciergeNotInstalled = errors.New("concierge not installed")

Functions

func ConciergeInfoFromConfig added in v0.34.8

func ConciergeInfoFromConfig(ctx context.Context, cfg []byte) (*appv1alpha1.ConciergeInfo, error)

func EnsureComponentsConfig added in v0.35.0

func EnsureComponentsConfig(ctx context.Context, r client.Client, cl *appv1alpha1.Cluster) error

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 IgnoreConciergeNotInstalled added in v0.34.8

func IgnoreConciergeNotInstalled(err error) 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

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.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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