certificatesigningrequest

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCreateCSR

func NewCmdCreateCSR(ctx context.Context, ioStreams genericclioptions.IOStreams, factory cmdutil.Factory) *cobra.Command

NewCmdCreateCSR returns a cobra command for create CertificateSigningRequest

Types

type Options

type Options struct {
	Client     kubernetes.Interface
	RESTConfig *restclient.Config

	// boolean indicating if there was an Override in determining CmdNamespace.
	EnforceNamespace bool

	// Name of file that the generated private key will be stored in If not
	// specified, the private key will be written to '<NameOfCSR>.key'.
	KeyFilename string

	// If true, will wait for CertificateSigingRequest to be ready to store the
	// x509 certificate in a file.
	// Command will block until CertificateSigningRequest is ready or timeout as
	// specified by Timeout happens.
	FetchCert bool

	// Name of file that the generated x509 certificate will be stored in if
	// --fetch-certificate flag is set If not specified, the private key will be
	// written to '<NameOfCSR>.crt'.
	CertFileName string

	// Path to a file containing a Certificate resource used as a template when
	// generating the CertificateSigningRequest resource.
	// Required.
	InputFilename string

	// Length of time the command blocks to wait on CertificateSigningRequest to
	// be ready if --fetch-certificate flag is set If not specified, default
	// value is 5 minutes.
	Timeout time.Duration

	genericclioptions.IOStreams
}

Options is a struct to support create certificatesigningrequest command

func NewOptions

func NewOptions(ioStreams genericclioptions.IOStreams) *Options

NewOptions returns initialized Options

func (*Options) Complete

func (o *Options) Complete(f cmdutil.Factory) error

Complete takes the command arguments and factory and infers any remaining options.

func (*Options) Run

func (o *Options) Run(ctx context.Context, args []string) error

Run executes create certificatesigningrequest command

func (*Options) Validate

func (o *Options) Validate(args []string) error

Validate validates the provided options

Jump to

Keyboard shortcuts

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