helpers

package
v1.25.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdHelperKubectlAuth

func NewCmdHelperKubectlAuth(f *util.Factory, out io.Writer) *cobra.Command

NewCmdHelperKubectlAuth builds a cobra command for the kubectl-auth command

func RunKubectlAuthHelper

func RunKubectlAuthHelper(ctx context.Context, f *util.Factory, out io.Writer, options *HelperKubectlAuthOptions) error

RunKubectlAuthHelper implements the kubectl auth helper, which creates an authentication token

Types

type ExecCredential

type ExecCredential struct {
	APIVersion string               `json:"apiVersion,omitempty"`
	Kind       string               `json:"kind,omitempty"`
	Status     ExecCredentialStatus `json:"status"`
}

ExecCredential specifies the client.authentication.k8s.io ExecCredential object

type ExecCredentialStatus

type ExecCredentialStatus struct {
	ClientCertificateData string    `json:"clientCertificateData,omitempty"`
	ClientKeyData         string    `json:"clientKeyData,omitempty"`
	ExpirationTimestamp   time.Time `json:"expirationTimestamp,omitempty"`
}

ExecCredentialStatus specifies the status of the client.authentication.k8s.io ExecCredential object

type HelperKubectlAuthOptions

type HelperKubectlAuthOptions struct {
	// ClusterName is the name of the cluster we are targeting
	ClusterName string

	// Lifetime specifies the desired duration of the credential
	Lifetime time.Duration

	// APIVersion specifies the version of the client.authentication.k8s.io schema in use
	APIVersion string
}

HelperKubectlAuthOptions holds the options for generating an authentication token

func (*HelperKubectlAuthOptions) InitDefaults

func (o *HelperKubectlAuthOptions) InitDefaults()

InitDefaults populates the default values of options

Jump to

Keyboard shortcuts

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