v1

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

+kubebuilder:validation:Optional +groupName=apiserver.openshift.io Package v1 is the v1 version of the API.

Package v1 is an api version in the apiserver.openshift.io group

Index

Constants

View Source
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"
)

Variables

View Source
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
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource generated code relies on this being here, but it logically belongs to the group DEPRECATED

Types

type APIRequestCount

type APIRequestCount struct {
	metav1.TypeMeta   `json:",inline"`
	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"`
}

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).

func (*APIRequestCount) DeepCopy

func (in *APIRequestCount) DeepCopy() *APIRequestCount

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCount.

func (*APIRequestCount) DeepCopyInto

func (in *APIRequestCount) DeepCopyInto(out *APIRequestCount)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIRequestCount) DeepCopyObject

func (in *APIRequestCount) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (APIRequestCount) SwaggerDoc

func (APIRequestCount) SwaggerDoc() map[string]string

type APIRequestCountList

type APIRequestCountList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []APIRequestCount `json:"items"`
}

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).

func (*APIRequestCountList) DeepCopy

func (in *APIRequestCountList) DeepCopy() *APIRequestCountList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountList.

func (*APIRequestCountList) DeepCopyInto

func (in *APIRequestCountList) DeepCopyInto(out *APIRequestCountList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIRequestCountList) DeepCopyObject

func (in *APIRequestCountList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (APIRequestCountList) SwaggerDoc

func (APIRequestCountList) SwaggerDoc() map[string]string

type APIRequestCountSpec

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 (*APIRequestCountSpec) DeepCopy

func (in *APIRequestCountSpec) DeepCopy() *APIRequestCountSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountSpec.

func (*APIRequestCountSpec) DeepCopyInto

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

func (APIRequestCountSpec) SwaggerDoc() map[string]string

type APIRequestCountStatus

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"`
}

+k8s:deepcopy-gen=true

func (*APIRequestCountStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountStatus.

func (*APIRequestCountStatus) DeepCopyInto

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

func (APIRequestCountStatus) SwaggerDoc() map[string]string

type PerNodeAPIRequestLog

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"`
}

PerNodeAPIRequestLog contains logs of requests to a certain node.

func (*PerNodeAPIRequestLog) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerNodeAPIRequestLog.

func (*PerNodeAPIRequestLog) DeepCopyInto

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

func (PerNodeAPIRequestLog) SwaggerDoc() map[string]string

type PerResourceAPIRequestLog

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"`
}

PerResourceAPIRequestLog logs request for various nodes.

func (*PerResourceAPIRequestLog) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerResourceAPIRequestLog.

func (*PerResourceAPIRequestLog) DeepCopyInto

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

func (PerResourceAPIRequestLog) SwaggerDoc() map[string]string

type PerUserAPIRequestCount

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"`
}

PerUserAPIRequestCount contains logs of a user's requests.

func (*PerUserAPIRequestCount) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerUserAPIRequestCount.

func (*PerUserAPIRequestCount) DeepCopyInto

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

func (PerUserAPIRequestCount) SwaggerDoc() map[string]string

type PerVerbAPIRequestCount

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"`
}

PerVerbAPIRequestCount requestCounts requests by API request verb.

func (*PerVerbAPIRequestCount) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerVerbAPIRequestCount.

func (*PerVerbAPIRequestCount) DeepCopyInto

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

func (PerVerbAPIRequestCount) SwaggerDoc() map[string]string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL