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.
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
- Variables
- func ConciergeInfoFromConfig(ctx context.Context, cfg *rest.Config) (*appv1alpha1.ConciergeInfo, error)
- func EnsureComponentsConfig(ctx context.Context, r client.Client, cl *appv1alpha1.Cluster) error
- func GetInternalKubeconfig(ctx context.Context, c client.Reader, cluster client.ObjectKey) ([]byte, error)
- func IgnoreConciergeNotInstalled(err error) error
- func NewClusterClient(ctx context.Context, c client.Client, name, namespace string) (client.Client, error)
- func NewClusterConfig(ctx context.Context, c client.Client, name, namespace string) (*rest.Config, error)
- func NewInClusterRESTClientGetter(cfg *rest.Config, namespace string) genericclioptions.RESTClientGetter
- func NewMemoryRESTClientGetter(kubeConfig []byte, namespace string) genericclioptions.RESTClientGetter
- func NewProxyHandler(apiProxyPrefix string, cfg *rest.Config, keepalive time.Duration) (http.Handler, error)
- type MemoryRESTClientGetter
- func (c *MemoryRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (c *MemoryRESTClientGetter) ToRESTConfig() (*rest.Config, error)
- func (c *MemoryRESTClientGetter) ToRESTMapper() (meta.RESTMapper, error)
- func (c *MemoryRESTClientGetter) ToRawKubeConfigLoader() clientcmd.ClientConfig
- type Purpose
Constants ¶
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") )
Variables ¶
var ErrConciergeNotInstalled = errors.New("concierge not installed")
Functions ¶
func ConciergeInfoFromConfig ¶ added in v0.34.8
func ConciergeInfoFromConfig(ctx context.Context, cfg *rest.Config) (*appv1alpha1.ConciergeInfo, error)
func EnsureComponentsConfig ¶ added in v0.35.0
func GetInternalKubeconfig ¶ added in v0.21.0
func IgnoreConciergeNotInstalled ¶ added in v0.34.8
func NewClusterClient ¶ added in v0.18.9
func NewClusterConfig ¶ added in v0.21.0
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 (c *MemoryRESTClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
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