cluster-api: sigs.k8s.io/cluster-api/util/kubeconfig Index | Files

package kubeconfig

import "sigs.k8s.io/cluster-api/util/kubeconfig"

Index

Package Files

kubeconfig.go testing.go

Variables

var (
    ErrDependentCertificateNotFound = errors.New("could not find secret ca")
)

func CreateEnvTestSecret Uses

func CreateEnvTestSecret(ctx context.Context, client client.Client, cfg *rest.Config, cluster *clusterv1.Cluster) error

Deprecated: use test/helpers/envtest

func CreateSecret Uses

func CreateSecret(ctx context.Context, c client.Client, cluster *clusterv1.Cluster) error

CreateSecret creates the Kubeconfig secret for the given cluster.

func CreateSecretWithOwner Uses

func CreateSecretWithOwner(ctx context.Context, c client.Client, clusterName client.ObjectKey, endpoint string, owner metav1.OwnerReference) error

CreateSecretWithOwner creates the Kubeconfig secret for the given cluster name, namespace, endpoint, and owner reference.

func FromEnvTestConfig Uses

func FromEnvTestConfig(cfg *rest.Config, cluster *clusterv1.Cluster) []byte

func FromSecret Uses

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

FromSecret fetches the Kubeconfig for a Cluster.

func GenerateSecret Uses

func GenerateSecret(cluster *clusterv1.Cluster, data []byte) *corev1.Secret

GenerateSecret returns a Kubernetes secret for the given Cluster and kubeconfig data.

func GenerateSecretWithOwner Uses

func GenerateSecretWithOwner(clusterName client.ObjectKey, data []byte, owner metav1.OwnerReference) *corev1.Secret

GenerateSecretWithOwner returns a Kubernetes secret for the given Cluster name, namespace, kubeconfig data, and ownerReference.

func NeedsClientCertRotation Uses

func NeedsClientCertRotation(configSecret *corev1.Secret, threshold time.Duration) (bool, error)

NeedsClientCertRotation returns whether any of the Kubeconfig secret's client certificates will expire before the given threshold.

func New Uses

func New(clusterName, endpoint string, caCert *x509.Certificate, caKey crypto.Signer) (*api.Config, error)

New creates a new Kubeconfig using the cluster name and specified endpoint.

func RegenerateSecret Uses

func RegenerateSecret(ctx context.Context, c client.Client, configSecret *corev1.Secret) error

RegenerateSecret creates and stores a new Kubeconfig in the given secret.

Package kubeconfig imports 17 packages (graph) and is imported by 13 packages. Updated 2020-10-22. Refresh now. Tools for package owners.