certificate

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdStatusCert

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

NewCmdStatusCert returns a cobra command for status certificate

Types

type CRStatus added in v1.0.0

type CRStatus struct {
	// If Error is not nil, there was a problem getting the status of the CertificateRequest resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the CertificateRequest resource
	Name string
	// Namespace of the CertificateRequest resource
	Namespace string
	// Conditions of CertificateRequest resource
	Conditions []cmapi.CertificateRequestCondition
	// Events of CertificateRequest resource
	Events *v1.EventList
}

func (*CRStatus) String added in v1.0.0

func (crStatus *CRStatus) String() string

String returns the information about the status of a CR as a string to be printed as output

type CertificateStatus added in v1.0.0

type CertificateStatus struct {
	// Name of the Certificate resource
	Name string
	// Namespace of the Certificate resource
	Namespace string
	// Creation Time of Certificate resource
	CreationTime metav1.Time
	// Conditions of Certificate resource
	Conditions []cmapi.CertificateCondition
	// DNS Names of Certificate resource
	DNSNames []string
	// Events of Certificate resource
	Events *v1.EventList
	// Not Before of Certificate resource
	NotBefore *metav1.Time
	// Not After of Certificate resource
	NotAfter *metav1.Time
	// Renewal Time of Certificate resource
	RenewalTime *metav1.Time

	IssuerStatus *IssuerStatus

	SecretStatus *SecretStatus

	CRStatus *CRStatus

	OrderStatus *OrderStatus

	ChallengeStatusList *ChallengeStatusList
}

func StatusFromResources added in v1.0.0

func StatusFromResources(data *Data) *CertificateStatus

StatusFromResources takes in a Data struct and returns a CertificateStatus built using the information in data.

func (*CertificateStatus) String added in v1.0.0

func (status *CertificateStatus) String() string

type ChallengeStatus added in v1.0.0

type ChallengeStatus struct {
	Name       string
	Type       cmacme.ACMEChallengeType
	Token      string
	Key        string
	State      cmacme.State
	Reason     string
	Processing bool
	Presented  bool
}

func (*ChallengeStatus) String added in v1.0.0

func (challengeStatus *ChallengeStatus) String() string

type ChallengeStatusList added in v1.0.0

type ChallengeStatusList struct {
	// If Error is not nil, there was a problem getting the status of the Order resource,
	// so the rest of the fields is unusable
	Error             error
	ChallengeStatuses []*ChallengeStatus
}

func (*ChallengeStatusList) String added in v1.0.0

func (c *ChallengeStatusList) String() string

type Data added in v1.0.0

type Data struct {
	Certificate  *cmapi.Certificate
	CrtEvents    *corev1.EventList
	Issuer       cmapi.GenericIssuer
	IssuerKind   string
	IssuerError  error
	IssuerEvents *corev1.EventList
	Secret       *corev1.Secret
	SecretError  error
	SecretEvents *corev1.EventList
	Req          *cmapi.CertificateRequest
	ReqError     error
	ReqEvents    *corev1.EventList
	Order        *cmacme.Order
	OrderError   error
	Challenges   []*cmacme.Challenge
	ChallengeErr error
}

Data is a struct containing the information to build a CertificateStatus

type IssuerStatus added in v1.0.0

type IssuerStatus struct {
	// If Error is not nil, there was a problem getting the status of the Issuer/ClusterIssuer resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Issuer/ClusterIssuer resource
	Name string
	// Kind of the resource, can be Issuer or ClusterIssuer
	Kind string
	// Conditions of Issuer/ClusterIssuer resource
	Conditions []cmapi.IssuerCondition
	// Events of Issuer/ClusterIssuer resource
	Events *v1.EventList
}

func (*IssuerStatus) String added in v1.0.0

func (issuerStatus *IssuerStatus) String() string

String returns the information about the status of a Issuer/ClusterIssuer as a string to be printed as output

type Options

type Options struct {
	CMClient   cmclient.Interface
	RESTConfig *restclient.Config
	// The Namespace that the Certificate to be queried about resides in.
	// This flag registration is handled by cmdutil.Factory
	Namespace string

	genericclioptions.IOStreams
}

Options is a struct to support status certificate 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 factory and infers any remaining options.

func (*Options) GetResources added in v1.0.0

func (o *Options) GetResources(ctx context.Context, crtName string) (*Data, error)

GetResources collects all related resources of the Certificate and any errors while doing so in a Data struct and returns it. Returns error if error occurs when finding Certificate resource or while preparing to find other resources, e.g. when creating clientSet

func (*Options) Run

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

Run executes status certificate command

func (*Options) Validate

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

Validate validates the provided options

type OrderStatus added in v1.0.0

type OrderStatus struct {
	// If Error is not nil, there was a problem getting the status of the Order resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Order resource
	Name string
	// State of Order resource
	State cmacme.State
	// Reason why the Order resource is in its State
	Reason string
	// What authorizations must be completed to validate the DNS names specified on the Order
	Authorizations []cmacme.ACMEAuthorization
	// Time the Order failed
	FailureTime *metav1.Time
}

func (*OrderStatus) String added in v1.0.0

func (orderStatus *OrderStatus) String() string

String returns the information about the status of a CR as a string to be printed as output

type SecretStatus added in v1.0.0

type SecretStatus struct {
	// If Error is not nil, there was a problem getting the status of the Secret resource,
	// so the rest of the fields is unusable
	Error error
	// Name of the Secret resource
	Name string
	// Issuer Countries of the x509 certificate in the Secret
	IssuerCountry []string
	// Issuer Organisations of the x509 certificate in the Secret
	IssuerOrganisation []string
	// Issuer Common Name of the x509 certificate in the Secret
	IssuerCommonName string
	// Key Usage of the x509 certificate in the Secret
	KeyUsage x509.KeyUsage
	// Extended Key Usage of the x509 certificate in the Secret
	ExtKeyUsage []x509.ExtKeyUsage
	// Public Key Algorithm of the x509 certificate in the Secret
	PublicKeyAlgorithm x509.PublicKeyAlgorithm
	// Signature Algorithm of the x509 certificate in the Secret
	SignatureAlgorithm x509.SignatureAlgorithm
	// Subject Key Id of the x509 certificate in the Secret
	SubjectKeyId []byte
	// Authority Key Id of the x509 certificate in the Secret
	AuthorityKeyId []byte
	// Serial Number of the x509 certificate in the Secret
	SerialNumber *big.Int
	// Events of Secret resource
	Events *v1.EventList
}

func (*SecretStatus) String added in v1.0.0

func (secretStatus *SecretStatus) String() string

String returns the information about the status of a Secret as a string to be printed as output

Jump to

Keyboard shortcuts

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