Skip to content

Commit a0c8ddb

Browse files
committed
fixup! rename types that were too generic
1 parent 78d4b6a commit a0c8ddb

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

config/v1/types_cluster_image_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type ClusterImagePolicySpec struct {
5252
// policy is a required field that contains configuration to allow scopes to be verified, and defines how
5353
// images not matching the verification policy will be treated.
5454
// +required
55-
Policy ImageScopeVerificationPolicy `json:"policy"`
55+
Policy *ImageScopeVerificationPolicy `json:"policy,omitempty"`
5656
}
5757

5858
// +k8s:deepcopy-gen=true

config/v1/types_image_policy.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type ImagePolicySpec struct {
5151
// policy is a required field that contains configuration to allow scopes to be verified, and defines how
5252
// images not matching the verification policy will be treated.
5353
// +required
54-
Policy ImageScopeVerificationPolicy `json:"policy"`
54+
Policy *ImageScopeVerificationPolicy `json:"policy,omitempty"`
5555
}
5656

5757
// +kubebuilder:validation:XValidation:rule="size(self.split('/')[0].split('.')) == 1 ? self.split('/')[0].split('.')[0].split(':')[0] == 'localhost' : true",message="invalid image scope format, scope must contain a fully qualified domain name or 'localhost'"
@@ -89,7 +89,7 @@ type PolicyRootOfTrust struct {
8989
// publicKey defines the root of trust configuration based on a sigstore public key. Optionally include a Rekor public key for Rekor verification.
9090
// publicKey is required when policyType is PublicKey, and forbidden otherwise.
9191
// +optional
92-
PublicKey *PublicKeyVerificationPolicyRootOfTrust `json:"publicKey,omitempty"`
92+
PublicKey PublicKeyVerificationPolicyRootOfTrust `json:"publicKey,omitzero,omitempty"`
9393
// fulcioCAWithRekor defines the root of trust configuration based on the Fulcio certificate and the Rekor public key.
9494
// fulcioCAWithRekor is required when policyType is FulcioCAWithRekor, and forbidden otherwise
9595
// For more information about Fulcio and Rekor, please refer to the document at:
@@ -100,7 +100,7 @@ type PolicyRootOfTrust struct {
100100
// pki is required when policyType is PKI, and forbidden otherwise.
101101
// +optional
102102
// +openshift:enable:FeatureGate=SigstoreImageVerificationPKI
103-
PKI *CertificateChainVerificationPolicyRootOfTrust `json:"pki,omitempty"`
103+
PKI CertificateChainVerificationPolicyRootOfTrust `json:"pki,omitzero,omitempty"`
104104
}
105105

106106
// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=PublicKey;FulcioCAWithRekor

config/v1alpha1/types_cluster_image_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type ClusterImagePolicySpec struct {
5151
// policy contains configuration to allow scopes to be verified, and defines how
5252
// images not matching the verification policy will be treated.
5353
// +required
54-
Policy ImageScopeVerificationPolicy `json:"policy"`
54+
Policy *ImageScopeVerificationPolicy `json:"policy,omitempty"`
5555
}
5656

5757
// +k8s:deepcopy-gen=true

config/v1alpha1/types_image_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type ImagePolicySpec struct {
5050
// policy contains configuration to allow scopes to be verified, and defines how
5151
// images not matching the verification policy will be treated.
5252
// +required
53-
Policy ImageScopeVerificationPolicy `json:"policy"`
53+
Policy *ImageScopeVerificationPolicy `json:"policy,omitempty"`
5454
}
5555

5656
// +kubebuilder:validation:XValidation:rule="size(self.split('/')[0].split('.')) == 1 ? self.split('/')[0].split('.')[0].split(':')[0] == 'localhost' : true",message="invalid image scope format, scope must contain a fully qualified domain name or 'localhost'"

0 commit comments

Comments
 (0)