const ( // RemovedInReleaseLabel is a label which can be used to select APIRequestCounts based on the release // in which they are removed. The value is equivalent to .status.removedInRelease. RemovedInReleaseLabel = "apirequestcounts.apiserver.openshift.io/removedInRelease" )
var ( GroupName = "apiserver.openshift.io" GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} // Install is a function which adds this version to a scheme Install = schemeBuilder.AddToScheme // SchemeGroupVersion generated code relies on this name // Deprecated SchemeGroupVersion = GroupVersion // AddToScheme exists solely to keep the old generators creating valid code // DEPRECATED AddToScheme = schemeBuilder.AddToScheme )
func Resource(resource string) schema.GroupResource
Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED
APIRequestCount tracks requests made to an API. The instance name must be of the form `resource.version.group`, matching the resource.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
type APIRequestCount struct { metav1.TypeMeta `json:",inline"` // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // spec defines the characteristics of the resource. // +kubebuilder:validation:Required // +required Spec APIRequestCountSpec `json:"spec"` // status contains the observed state of the resource. Status APIRequestCountStatus `json:"status,omitempty"` }
func (in *APIRequestCount) DeepCopy() *APIRequestCount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCount.
func (in *APIRequestCount) DeepCopyInto(out *APIRequestCount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIRequestCount) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (APIRequestCount) SwaggerDoc() map[string]string
APIRequestCountList is a list of APIRequestCount resources.
Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
type APIRequestCountList struct { metav1.TypeMeta `json:",inline"` // metadata is the standard list's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` Items []APIRequestCount `json:"items"` }
func (in *APIRequestCountList) DeepCopy() *APIRequestCountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountList.
func (in *APIRequestCountList) DeepCopyInto(out *APIRequestCountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIRequestCountList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (APIRequestCountList) SwaggerDoc() map[string]string
type APIRequestCountSpec struct { // numberOfUsersToReport is the number of users to include in the report. // If unspecified or zero, the default is ten. This is default is subject to change. // +kubebuilder:default:=10 // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 // +optional NumberOfUsersToReport int64 `json:"numberOfUsersToReport"` }
func (in *APIRequestCountSpec) DeepCopy() *APIRequestCountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountSpec.
func (in *APIRequestCountSpec) DeepCopyInto(out *APIRequestCountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (APIRequestCountSpec) SwaggerDoc() map[string]string
+k8s:deepcopy-gen=true
type APIRequestCountStatus struct { // conditions contains details of the current status of this API Resource. // +patchMergeKey=type // +patchStrategy=merge Conditions []metav1.Condition `json:"conditions" patchStrategy:"merge" patchMergeKey:"type"` // removedInRelease is when the API will be removed. // +kubebuilder:validation:MinLength=0 // +kubebuilder:validation:Pattern=^[0-9][0-9]*\.[0-9][0-9]*$ // +kubebuilder:validation:MaxLength=64 // +optional RemovedInRelease string `json:"removedInRelease,omitempty"` // requestCount is a sum of all requestCounts across all current hours, nodes, and users. // +kubebuilder:validation:Minimum=0 // +required RequestCount int64 `json:"requestCount"` // currentHour contains request history for the current hour. This is porcelain to make the API // easier to read by humans seeing if they addressed a problem. This field is reset on the hour. // +optional CurrentHour PerResourceAPIRequestLog `json:"currentHour"` // last24h contains request history for the last 24 hours, indexed by the hour, so // 12:00AM-12:59 is in index 0, 6am-6:59am is index 6, etc. The index of the current hour // is updated live and then duplicated into the requestsLastHour field. // +kubebuilder:validation:MaxItems=24 // +optional Last24h []PerResourceAPIRequestLog `json:"last24h"` }
func (in *APIRequestCountStatus) DeepCopy() *APIRequestCountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountStatus.
func (in *APIRequestCountStatus) DeepCopyInto(out *APIRequestCountStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (APIRequestCountStatus) SwaggerDoc() map[string]string
PerNodeAPIRequestLog contains logs of requests to a certain node.
type PerNodeAPIRequestLog struct { // nodeName where the request are being handled. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=512 // +required NodeName string `json:"nodeName"` // requestCount is a sum of all requestCounts across all users, even those outside of the top 10 users. // +kubebuilder:validation:Minimum=0 // +required RequestCount int64 `json:"requestCount"` // byUser contains request details by top .spec.numberOfUsersToReport users. // Note that because in the case of an apiserver, restart the list of top users is determined on a best-effort basis, // the list might be imprecise. // In addition, some system users may be explicitly included in the list. // +kubebuilder:validation:MaxItems=500 ByUser []PerUserAPIRequestCount `json:"byUser"` }
func (in *PerNodeAPIRequestLog) DeepCopy() *PerNodeAPIRequestLog
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerNodeAPIRequestLog.
func (in *PerNodeAPIRequestLog) DeepCopyInto(out *PerNodeAPIRequestLog)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PerNodeAPIRequestLog) SwaggerDoc() map[string]string
PerResourceAPIRequestLog logs request for various nodes.
type PerResourceAPIRequestLog struct { // byNode contains logs of requests per node. // +kubebuilder:validation:MaxItems=512 // +optional ByNode []PerNodeAPIRequestLog `json:"byNode"` // requestCount is a sum of all requestCounts across nodes. // +kubebuilder:validation:Minimum=0 // +required RequestCount int64 `json:"requestCount"` }
func (in *PerResourceAPIRequestLog) DeepCopy() *PerResourceAPIRequestLog
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerResourceAPIRequestLog.
func (in *PerResourceAPIRequestLog) DeepCopyInto(out *PerResourceAPIRequestLog)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PerResourceAPIRequestLog) SwaggerDoc() map[string]string
PerUserAPIRequestCount contains logs of a user's requests.
type PerUserAPIRequestCount struct { // userName that made the request. // +kubebuilder:validation:MaxLength=512 UserName string `json:"username"` // userAgent that made the request. // The same user often has multiple binaries which connect (pods with many containers). The different binaries // will have different userAgents, but the same user. In addition, we have userAgents with version information // embedded and the userName isn't likely to change. // +kubebuilder:validation:MaxLength=1024 UserAgent string `json:"userAgent"` // requestCount of requests by the user across all verbs. // +kubebuilder:validation:Minimum=0 // +required RequestCount int64 `json:"requestCount"` // byVerb details by verb. // +kubebuilder:validation:MaxItems=10 ByVerb []PerVerbAPIRequestCount `json:"byVerb"` }
func (in *PerUserAPIRequestCount) DeepCopy() *PerUserAPIRequestCount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerUserAPIRequestCount.
func (in *PerUserAPIRequestCount) DeepCopyInto(out *PerUserAPIRequestCount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PerUserAPIRequestCount) SwaggerDoc() map[string]string
PerVerbAPIRequestCount requestCounts requests by API request verb.
type PerVerbAPIRequestCount struct { // verb of API request (get, list, create, etc...) // +kubebuilder:validation:MaxLength=20 // +required Verb string `json:"verb"` // requestCount of requests for verb. // +kubebuilder:validation:Minimum=0 // +required RequestCount int64 `json:"requestCount"` }
func (in *PerVerbAPIRequestCount) DeepCopy() *PerVerbAPIRequestCount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerVerbAPIRequestCount.
func (in *PerVerbAPIRequestCount) DeepCopyInto(out *PerVerbAPIRequestCount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PerVerbAPIRequestCount) SwaggerDoc() map[string]string