diff --git a/hack/golangci-hints.yaml b/hack/golangci-hints.yaml index 4bc74b6f349..55e6bb69598 100644 --- a/hack/golangci-hints.yaml +++ b/hack/golangci-hints.yaml @@ -147,7 +147,7 @@ linters: # Commentstart - Ignore commentstart issues for existing API group # TODO: For each existing API group, we aim to remove it over time. - text: "godoc for field .* should start with '.* ...'" - path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|imagepolicy|networking|resource|scheduling|storage|storagemigration)" + path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|networking|resource|scheduling|storage|storagemigration)" # notimestamp: Legacy 'Timestamp' fields retained for backward compatibility - text: 'notimestamp: naming convention "notimestamp": field TokenRequestStatus.ExpirationTimestamp: prefer use of the term ''time'' over ''timestamp''' diff --git a/hack/golangci.yaml b/hack/golangci.yaml index d13a9da56ae..b171a7a3884 100644 --- a/hack/golangci.yaml +++ b/hack/golangci.yaml @@ -162,7 +162,7 @@ linters: # Commentstart - Ignore commentstart issues for existing API group # TODO: For each existing API group, we aim to remove it over time. - text: "godoc for field .* should start with '.* ...'" - path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|imagepolicy|networking|resource|scheduling|storage|storagemigration)" + path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|networking|resource|scheduling|storage|storagemigration)" # notimestamp: Legacy 'Timestamp' fields retained for backward compatibility - text: 'notimestamp: naming convention "notimestamp": field TokenRequestStatus.ExpirationTimestamp: prefer use of the term ''time'' over ''timestamp''' diff --git a/hack/kube-api-linter/exceptions.yaml b/hack/kube-api-linter/exceptions.yaml index 185e080a6d7..85d5b2a3a0e 100644 --- a/hack/kube-api-linter/exceptions.yaml +++ b/hack/kube-api-linter/exceptions.yaml @@ -23,7 +23,7 @@ # Commentstart - Ignore commentstart issues for existing API group # TODO: For each existing API group, we aim to remove it over time. - text: "godoc for field .* should start with '.* ...'" - path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|imagepolicy|networking|resource|scheduling|storage|storagemigration)" + path: "staging/src/k8s.io/api/(apps|batch|certificates|core|extensions|flowcontrol|networking|resource|scheduling|storage|storagemigration)" # notimestamp: Legacy 'Timestamp' fields retained for backward compatibility - text: 'notimestamp: naming convention "notimestamp": field TokenRequestStatus.ExpirationTimestamp: prefer use of the term ''time'' over ''timestamp''' diff --git a/staging/src/k8s.io/api/imagepolicy/v1alpha1/types.go b/staging/src/k8s.io/api/imagepolicy/v1alpha1/types.go index eaa0ab51981..43567ee6b57 100644 --- a/staging/src/k8s.io/api/imagepolicy/v1alpha1/types.go +++ b/staging/src/k8s.io/api/imagepolicy/v1alpha1/types.go @@ -29,39 +29,39 @@ import ( // +k8s:supportsSubresource="/status" type ImageReview struct { metav1.TypeMeta `json:""` - // Standard object's metadata. + // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Spec holds information about the pod being evaluated + // spec holds information about the pod being evaluated // +optional Spec ImageReviewSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // Status is filled in by the backend and indicates whether the pod should be allowed. + // status is filled in by the backend and indicates whether the pod should be allowed. // +optional Status ImageReviewStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } // ImageReviewSpec is a description of the pod creation request. type ImageReviewSpec struct { - // Containers is a list of a subset of the information in each container of the Pod being created. + // containers is a list of a subset of the information in each container of the Pod being created. // +optional // +listType=atomic Containers []ImageReviewContainerSpec `json:"containers,omitempty" protobuf:"bytes,1,rep,name=containers"` - // Annotations is a list of key-value pairs extracted from the Pod's annotations. + // annotations is a list of key-value pairs extracted from the Pod's annotations. // It only includes keys which match the pattern `*.image-policy.k8s.io/*`. // It is up to each webhook backend to determine how to interpret these annotations, if at all. // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,2,rep,name=annotations"` - // Namespace is the namespace the pod is being created in. + // namespace is the namespace the pod is being created in. // +optional Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"` } // ImageReviewContainerSpec is a description of a container within the pod creation request. type ImageReviewContainerSpec struct { - // This can be in the form image:tag or image@SHA:012345679abcdef. + // image can be in the form image:tag or image@SHA:012345679abcdef. // +optional Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"` // In future, we may add command line overrides, exec health check command lines, and so on. @@ -69,15 +69,15 @@ type ImageReviewContainerSpec struct { // ImageReviewStatus is the result of the review for the pod creation request. type ImageReviewStatus struct { - // Allowed indicates that all images were allowed to be run. + // allowed indicates that all images were allowed to be run. // +optional Allowed bool `json:"allowed" protobuf:"varint,1,opt,name=allowed"` - // Reason should be empty unless Allowed is false in which case it + // reason should be empty unless Allowed is false in which case it // may contain a short description of what is wrong. Kubernetes // may truncate excessively long errors when displaying to the user. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` - // AuditAnnotations will be added to the attributes object of the + // auditAnnotations will be added to the attributes object of the // admission controller request using 'AddAnnotation'. The keys should // be prefix-less (i.e., the admission controller will add an // appropriate prefix).