Documentation ¶
Overview ¶
Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group +k8s:openapi-gen=true +kubebuilder:object:generate=true +k8s:conversion-gen=kubesphere.io/api/quota +k8s:defaulter-gen=TypeMeta +groupName=quota.kubesphere.io
Package v1alpha2 contains API Schema definitions for the quotas v1alpha2 API group +k8s:openapi-gen=true +kubebuilder:object:generate=true +k8s:conversion-gen=kubesphere.io/api/quota +k8s:defaulter-gen=TypeMeta +groupName=quota.kubesphere.io
Index ¶
Constants ¶
const ( ResourceKindCluster = "ResourceQuota" ResourcesSingularCluster = "resourcequota" ResourcesPluralCluster = "resourcequotas" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "quota.kubesphere.io", Version: "v1alpha2"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by pkg/client/... AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type ResourceQuota ¶
type ResourceQuota struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Spec defines the desired quota Spec ResourceQuotaSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` // Status defines the actual enforced quota and its current usage // +optional Status ResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
+genclient +genclient:nonNamespaced +kubebuilder:object:root=true +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:resource:categories="quota",scope="Cluster",path=resourcequotas +kubebuilder:subresource:status +kubebuilder:object:root=true WorkspaceResourceQuota sets aggregate quota restrictions enforced per workspace
func (*ResourceQuota) DeepCopy ¶
func (in *ResourceQuota) DeepCopy() *ResourceQuota
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuota.
func (*ResourceQuota) DeepCopyInto ¶
func (in *ResourceQuota) DeepCopyInto(out *ResourceQuota)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceQuota) DeepCopyObject ¶
func (in *ResourceQuota) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceQuotaList ¶
type ResourceQuotaList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds // +optional metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Items is a list of WorkspaceResourceQuota objects. // More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/ Items []ResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"` }
+kubebuilder:object:root=true +kubebuilder:object:root=true ResourceQuotaList is a list of WorkspaceResourceQuota items.
func (*ResourceQuotaList) DeepCopy ¶
func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList.
func (*ResourceQuotaList) DeepCopyInto ¶
func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceQuotaList) DeepCopyObject ¶
func (in *ResourceQuotaList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceQuotaSpec ¶
type ResourceQuotaSpec struct { // LabelSelector is used to select projects by label. LabelSelector map[string]string `json:"selector" protobuf:"bytes,1,opt,name=selector"` // Quota defines the desired quota Quota corev1.ResourceQuotaSpec `json:"quota" protobuf:"bytes,2,opt,name=quota"` }
ResourceQuotaSpec defines the desired quota restrictions
func (*ResourceQuotaSpec) DeepCopy ¶
func (in *ResourceQuotaSpec) DeepCopy() *ResourceQuotaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaSpec.
func (*ResourceQuotaSpec) DeepCopyInto ¶
func (in *ResourceQuotaSpec) DeepCopyInto(out *ResourceQuotaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceQuotaStatus ¶
type ResourceQuotaStatus struct { // Total defines the actual enforced quota and its current usage across all projects Total corev1.ResourceQuotaStatus `json:"total" protobuf:"bytes,1,opt,name=total"` // Namespaces slices the usage by project. Namespaces ResourceQuotasStatusByNamespace `json:"namespaces" protobuf:"bytes,2,rep,name=namespaces"` }
ResourceQuotaStatus defines the actual enforced quota and its current usage
func (*ResourceQuotaStatus) DeepCopy ¶
func (in *ResourceQuotaStatus) DeepCopy() *ResourceQuotaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatus.
func (*ResourceQuotaStatus) DeepCopyInto ¶
func (in *ResourceQuotaStatus) DeepCopyInto(out *ResourceQuotaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceQuotaStatusByNamespace ¶
type ResourceQuotaStatusByNamespace struct { corev1.ResourceQuotaStatus `json:",inline"` // Namespace the project this status applies to Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` }
ResourceQuotaStatusByNamespace gives status for a particular project
func (*ResourceQuotaStatusByNamespace) DeepCopy ¶
func (in *ResourceQuotaStatusByNamespace) DeepCopy() *ResourceQuotaStatusByNamespace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatusByNamespace.
func (*ResourceQuotaStatusByNamespace) DeepCopyInto ¶
func (in *ResourceQuotaStatusByNamespace) DeepCopyInto(out *ResourceQuotaStatusByNamespace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceQuotasStatusByNamespace ¶
type ResourceQuotasStatusByNamespace []ResourceQuotaStatusByNamespace
ResourceQuotasStatusByNamespace bundles multiple ResourceQuotaStatusByNamespace
func (ResourceQuotasStatusByNamespace) DeepCopy ¶
func (in ResourceQuotasStatusByNamespace) DeepCopy() ResourceQuotasStatusByNamespace
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotasStatusByNamespace.
func (ResourceQuotasStatusByNamespace) DeepCopyInto ¶
func (in ResourceQuotasStatusByNamespace) DeepCopyInto(out *ResourceQuotasStatusByNamespace)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.