v1

package
v0.0.0-...-395650e Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the certs v1 API group +kubebuilder:object:generate=true +groupName=certs.k8c.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "certs.k8c.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CertificateSpec   `json:"spec,omitempty"`
	Status CertificateStatus `json:"status,omitempty"`
}

Certificate is the Schema for the certificates API

func (*Certificate) DeepCopy

func (in *Certificate) DeepCopy() *Certificate

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Certificate.

func (*Certificate) DeepCopyInto

func (in *Certificate) DeepCopyInto(out *Certificate)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Certificate) DeepCopyObject

func (in *Certificate) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CertificateList

type CertificateList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Certificate `json:"items"`
}

CertificateList contains a list of Certificate

func (*CertificateList) DeepCopy

func (in *CertificateList) DeepCopy() *CertificateList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateList.

func (*CertificateList) DeepCopyInto

func (in *CertificateList) DeepCopyInto(out *CertificateList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CertificateList) DeepCopyObject

func (in *CertificateList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CertificateSpec

type CertificateSpec struct {
	// Requested set of X509 certificate subject attributes.
	// More info: https://pkgo.dev/crypto/x509/pkix#Name
	//
	// Name represents an X.509 distinguished name.
	// Note that Name is only an approximation of the X.509 structure.
	Subject *X509PkixSubject `json:"subject,omitempty"`

	// Requested DNS subject alternative names.
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	DNSName string `json:"dnsName,omitempty"`

	// Requested email subject alternative names.
	// +optional
	EmailAddresses []string `json:"emailAddresses,omitempty"`

	// Requested 'validity' (i.e. lifetime) of the Certificate.
	//
	// If unset, this defaults to 360 days.
	// Minimum accepted duration is 1 hour.
	// +kubebuilder:validation:Pattern=`^\d+[hdy]$`
	// +kubebuilder:validation:Required
	Validity string `json:"validity,omitempty"`

	// How long before the currently issued certificate's expiry cert-manager should
	// renew the certificate. For example, if a certificate is valid for 60 minutes,
	// and `renewBefore=10m`, cert-manager will begin to attempt to renew the certificate
	// 50 minutes after it was issued (i.e. when there are 10 minutes remaining until
	// the certificate is no longer valid).
	//
	// NOTE: The actual lifetime of the issued certificate is used to determine the
	// renewal time. If an issuer returns a certificate with a different lifetime than
	// the one requested, cert-manager will use the lifetime of the issued certificate.
	//
	// If unset, this defaults to 1/3 of the issued certificate's lifetime.
	// Minimum accepted value is 5 minutes.
	// Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration.
	// Cannot be set if the `renewBeforePercentage` field is set.
	// +kubebuilder:validation:Pattern=`^\d+[mh]$`
	// +optional
	RenewBefore string `json:"renewBefore,omitempty"`

	// Name of the Secret resource that will be automatically created and
	// managed by this Certificate resource. It will be populated with a
	// private key and certificate, signed by the denoted issuer. The Secret
	// resource lives in the same namespace as the Certificate resource.
	// +kubebuilder:validation:Required
	SecretRef SecretRef `json:"secretRef"`
}

CertificateSpec defines the desired state of Certificate

func (*CertificateSpec) DeepCopy

func (in *CertificateSpec) DeepCopy() *CertificateSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateSpec.

func (*CertificateSpec) DeepCopyInto

func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CertificateStatus

type CertificateStatus struct {
	ExpiryDate         metav1.Time `json:"expiryDate,omitempty"`
	RenewedAt          metav1.Time `json:"renewedAt,omitempty"`
	ObservedGeneration int64       `json:"observedGeneration,omitempty"`
	SecretRef          string      `json:"secretRef,omitempty"`
}

CertificateStatus defines the observed state of Certificate

func (*CertificateStatus) DeepCopy

func (in *CertificateStatus) DeepCopy() *CertificateStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateStatus.

func (*CertificateStatus) DeepCopyInto

func (in *CertificateStatus) DeepCopyInto(out *CertificateStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SecretRef

type SecretRef struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name,omitempty"`
}

SecretRef for specific secrets details

func (*SecretRef) DeepCopy

func (in *SecretRef) DeepCopy() *SecretRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.

func (*SecretRef) DeepCopyInto

func (in *SecretRef) DeepCopyInto(out *SecretRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type X509PkixSubject

type X509PkixSubject struct {
	// Country to be used on the Certificate.
	// +optional
	Country []string `json:"country,omitempty"`
	// Organization to be used on the Certificate.
	// +optional
	Organization []string `json:"organization,omitempty"`
	// Organizational Unit to be used on the Certificate.
	// +optional
	OrganizationalUnit []string `json:"organizationalUnit,omitempty"`
	// Common Name to be used on the Certificate
	// +optional
	CommonName string `json:"commonName,omitempty"`
	// Serial number to be used on the Certificate.
	// +optional
	SerialNumber string `json:"serialNumber,omitempty"`
}

X509PkixSubject Full X509 name specification as per: https://pkgo.dev/crypto/x509/pkix#Name

func (*X509PkixSubject) DeepCopy

func (in *X509PkixSubject) DeepCopy() *X509PkixSubject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new X509PkixSubject.

func (*X509PkixSubject) DeepCopyInto

func (in *X509PkixSubject) DeepCopyInto(out *X509PkixSubject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳