Remove omitempty from spec and status fields and make status optional

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2020-07-06 10:20:12 +01:00
parent 704d103bc1
commit 7b6d2f5dd0
7 changed files with 22 additions and 12 deletions

View File

@ -403,6 +403,8 @@ spec:
is a 'one-shot' resource, meaning it represents a single point in time request
for a certificate and cannot be re-used."
type: object
required:
- spec
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation

View File

@ -833,6 +833,8 @@ spec:
named in `spec.secretName`. \n The stored certificate will be renewed before
it expires (as configured by `spec.renewBefore`)."
type: object
required:
- spec
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation

View File

@ -37,8 +37,9 @@ type Challenge struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec ChallengeSpec `json:"spec,omitempty"`
Status ChallengeStatus `json:"status,omitempty"`
Spec ChallengeSpec `json:"spec"`
// +optional
Status ChallengeStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -31,8 +31,9 @@ type Order struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec OrderSpec `json:"spec,omitempty"`
Status OrderStatus `json:"status,omitempty"`
Spec OrderSpec `json:"spec"`
// +optional
Status OrderStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -35,10 +35,11 @@ type Certificate struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
// Desired state of the Certificate resource.
Spec CertificateSpec `json:"spec,omitempty"`
Spec CertificateSpec `json:"spec"`
// Status of the Certificate. This is set and managed automatically.
Status CertificateStatus `json:"status,omitempty"`
// +optional
Status CertificateStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -53,10 +53,11 @@ type CertificateRequest struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
// Desired state of the CertificateRequest resource.
Spec CertificateRequestSpec `json:"spec,omitempty"`
Spec CertificateRequestSpec `json:"spec"`
// Status of the CertificateRequest. This is set and managed automatically.
Status CertificateRequestStatus `json:"status,omitempty"`
// +optional
Status CertificateRequestStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

View File

@ -38,10 +38,11 @@ type ClusterIssuer struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
// Desired state of the ClusterIssuer resource.
Spec IssuerSpec `json:"spec,omitempty"`
Spec IssuerSpec `json:"spec"`
// Status of the ClusterIssuer. This is set and managed automatically.
Status IssuerStatus `json:"status,omitempty"`
// +optional
Status IssuerStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@ -67,10 +68,11 @@ type Issuer struct {
metav1.ObjectMeta `json:"metadata,omitempty"`
// Desired state of the Issuer resource.
Spec IssuerSpec `json:"spec,omitempty"`
Spec IssuerSpec `json:"spec"`
// Status of the Issuer. This is set and managed automatically.
Status IssuerStatus `json:"status,omitempty"`
// +optional
Status IssuerStatus `json:"status"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object