cue.dev/x/crd/cert-manager.io@v0.9.0

v1/CertificateRequest.cue raw

  1package v1
  2
  3import "time"
  4
  5// A CertificateRequest is used to request a signed certificate from one of the
  6// configured issuers.
  7//
  8// All fields within the CertificateRequest's `spec` are immutable after creation.
  9// A CertificateRequest will either succeed or fail, as denoted by its `Ready` status
 10// condition and its `status.failureTime` field.
 11//
 12// A CertificateRequest is a one-shot resource, meaning it represents a single
 13// point in time request for a certificate and cannot be re-used.
 14#CertificateRequest: {
 15	_embeddedResource
 16
 17	// APIVersion defines the versioned schema of this representation of an object.
 18	// Servers should convert recognized schemas to the latest internal value, and
 19	// may reject unrecognized values.
 20	// More info:
 21	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
 22	apiVersion?: string
 23
 24	// Kind is a string value representing the REST resource this object represents.
 25	// Servers may infer this from the endpoint the client submits requests to.
 26	// Cannot be updated.
 27	// In CamelCase.
 28	// More info:
 29	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
 30	kind?:     string
 31	metadata?: {}
 32
 33	// Specification of the desired state of the CertificateRequest resource.
 34	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
 35	spec?: {
 36		// Requested 'duration' (i.e. lifetime) of the Certificate. Note that the
 37		// issuer may choose to ignore the requested duration, just like any other
 38		// requested attribute.
 39		duration?: string
 40
 41		// Extra contains extra attributes of the user that created the CertificateRequest.
 42		// Populated by the cert-manager webhook on creation and immutable.
 43		extra?: [string]: [...string]
 44
 45		// Groups contains group membership of the user that created the CertificateRequest.
 46		// Populated by the cert-manager webhook on creation and immutable.
 47		groups?: [...string]
 48
 49		// Requested basic constraints isCA value. Note that the issuer may choose
 50		// to ignore the requested isCA value, just like any other requested attribute.
 51		//
 52		// NOTE: If the CSR in the `Request` field has a BasicConstraints extension,
 53		// it must have the same isCA value as specified here.
 54		//
 55		// If true, this will automatically add the `cert sign` usage to the list
 56		// of requested `usages`.
 57		isCA?: bool
 58
 59		// Reference to the issuer responsible for issuing the certificate.
 60		// If the issuer is namespace-scoped, it must be in the same namespace
 61		// as the Certificate. If the issuer is cluster-scoped, it can be used
 62		// from any namespace.
 63		//
 64		// The `name` field of the reference must always be specified.
 65		issuerRef!: {
 66			// Group of the issuer being referred to.
 67			// Defaults to 'cert-manager.io'.
 68			group?: string
 69
 70			// Kind of the issuer being referred to.
 71			// Defaults to 'Issuer'.
 72			kind?: string
 73
 74			// Name of the issuer being referred to.
 75			name!: string
 76		}
 77
 78		// The PEM-encoded X.509 certificate signing request to be submitted to the
 79		// issuer for signing.
 80		//
 81		// If the CSR has a BasicConstraints extension, its isCA attribute must
 82		// match the `isCA` value of this CertificateRequest.
 83		// If the CSR has a KeyUsage extension, its key usages must match the
 84		// key usages in the `usages` field of this CertificateRequest.
 85		// If the CSR has a ExtKeyUsage extension, its extended key usages
 86		// must match the extended key usages in the `usages` field of this
 87		// CertificateRequest.
 88		request!: string
 89
 90		// UID contains the uid of the user that created the CertificateRequest.
 91		// Populated by the cert-manager webhook on creation and immutable.
 92		uid?: string
 93
 94		// Requested key usages and extended key usages.
 95		//
 96		// NOTE: If the CSR in the `Request` field has uses the KeyUsage or
 97		// ExtKeyUsage extension, these extensions must have the same values
 98		// as specified here without any additional values.
 99		//
100		// If unset, defaults to `digital signature` and `key encipherment`.
101		usages?: [
102			..."signing" |
103				"digital signature" |
104				"content commitment" |
105				"key encipherment" |
106				"key agreement" |
107				"data encipherment" |
108				"cert sign" |
109				"crl sign" |
110				"encipher only" |
111				"decipher only" |
112				"any" |
113				"server auth" |
114				"client auth" |
115				"code signing" |
116				"email protection" |
117				"s/mime" |
118				"ipsec end system" |
119				"ipsec tunnel" |
120				"ipsec user" |
121				"timestamping" |
122				"ocsp signing" |
123				"microsoft sgc" |
124				"netscape sgc",
125		]
126
127		// Username contains the name of the user that created the CertificateRequest.
128		// Populated by the cert-manager webhook on creation and immutable.
129		username?: string
130	}
131
132	// Status of the CertificateRequest.
133	// This is set and managed automatically.
134	// Read-only.
135	// More info:
136	// https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
137	status?: {
138		// The PEM encoded X.509 certificate of the signer, also known as the CA
139		// (Certificate Authority).
140		// This is set on a best-effort basis by different issuers.
141		// If not set, the CA is assumed to be unknown/not available.
142		ca?: string
143
144		// The PEM encoded X.509 certificate resulting from the certificate
145		// signing request.
146		// If not set, the CertificateRequest has either not been completed or has
147		// failed. More information on failure can be found by checking the
148		// `conditions` field.
149		certificate?: string
150
151		// List of status conditions to indicate the status of a CertificateRequest.
152		// Known condition types are `Ready`, `InvalidRequest`, `Approved` and `Denied`.
153		conditions?: [...{
154			// LastTransitionTime is the timestamp corresponding to the last status
155			// change of this condition.
156			lastTransitionTime?: time.Time
157
158			// Message is a human readable description of the details of the last
159			// transition, complementing reason.
160			message?: string
161
162			// Reason is a brief machine readable explanation for the condition's last
163			// transition.
164			reason?: string
165
166			// Status of the condition, one of (`True`, `False`, `Unknown`).
167			status!: "True" | "False" | "Unknown"
168
169			// Type of the condition, known values are (`Ready`, `InvalidRequest`,
170			// `Approved`, `Denied`).
171			type!: string
172		}]
173
174		// FailureTime stores the time that this CertificateRequest failed. This is
175		// used to influence garbage collection and back-off.
176		failureTime?: time.Time
177	}
178
179	_embeddedResource: {
180		apiVersion!: string
181		kind!:       string
182		metadata?:   {...}
183	}
184	apiVersion: "cert-manager.io/v1"
185	kind:       "CertificateRequest"
186	metadata!: {
187		name!:      string
188		namespace!: string
189		labels?: [string]:      string
190		annotations?: [string]: string
191		...
192	}
193}