kube

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package kube contains helpers for interacting with a kubernetes cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubeconfigFromNamespacedSecret added in v0.1.0

func KubeconfigFromNamespacedSecret(ctx context.Context, kClient client.Client, kubeconfig v1alpha1.Kubeconfig) ([]byte, error)

KubeconfigFromNamespacedSecret loads a kubeconfig from a cross-namespace secret in the cluster

func KubeconfigFromNamespacedSecretOrCluster added in v0.1.0

func KubeconfigFromNamespacedSecretOrCluster(ctx context.Context, kClient client.Client, kubeconfig v1alpha1.Kubeconfig) (raw []byte, err error)

KubeconfigFromNamespacedSecretOrCluster loads a kubeconfig from a cross-namespace secret or generates one from inCluster

func KubeconfigFromSecret

func KubeconfigFromSecret(ctx context.Context, kClient client.Client, kubeconfig v1beta1.Kubeconfig, namespace string) ([]byte, error)

KubeconfigFromSecret loads a kubeconfig from a secret in the cluster

func KubeconfigFromSecretOrCluster

func KubeconfigFromSecretOrCluster(ctx context.Context, kClient client.Client, kubeconfig v1beta1.Kubeconfig, namespace string) (raw []byte, err error)

KubeconfigFromSecretOrCluster loads a kubeconfig from a secret or generates one from inCluster

func RawFromInClusterRestConfig

func RawFromInClusterRestConfig() ([]byte, error)

RawFromInClusterRestConfig creates a kubeconfig from an incluster rest config

func RawFromRestConfig

func RawFromRestConfig(rc *rest.Config) ([]byte, error)

RawFromRestConfig creates a raw kubeconfig from a REST Config

func RestConfigFromKubeconfig

func RestConfigFromKubeconfig(kubeconfig []byte) (*rest.Config, error)

RestConfigFromKubeconfig either creates a rest.Config from a v1alpha1.Kubeconfig or returns an in-cluster config if the kubeconfig is nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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