Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API. +k8s:deepcopy-gen=package,register +k8s:openapi-gen=true +groupName=config.karmada.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type CustomizationRules
- type CustomizationTarget
- type DependencyInterpretation
- type DependentObjectReference
- type HealthInterpretation
- type InterpreterOperation
- type LocalValueRetention
- type PatchType
- type ReplicaResourceRequirement
- type ReplicaRevision
- type RequestStatus
- type ResourceInterpreterContext
- type ResourceInterpreterCustomization
- type ResourceInterpreterCustomizationList
- type ResourceInterpreterCustomizationSpec
- type ResourceInterpreterRequest
- type ResourceInterpreterResponse
- type ResourceInterpreterWebhook
- type ResourceInterpreterWebhookConfiguration
- type ResourceInterpreterWebhookConfigurationList
- func (in *ResourceInterpreterWebhookConfigurationList) DeepCopy() *ResourceInterpreterWebhookConfigurationList
- func (in *ResourceInterpreterWebhookConfigurationList) DeepCopyInto(out *ResourceInterpreterWebhookConfigurationList)
- func (in *ResourceInterpreterWebhookConfigurationList) DeepCopyObject() runtime.Object
- type Rule
- type RuleWithOperations
- type StatusAggregation
- type StatusReflection
Constants ¶
const ( // ResourceKindResourceInterpreterWebhookConfiguration is kind name of ResourceInterpreterWebhookConfiguration. ResourceKindResourceInterpreterWebhookConfiguration = "ResourceInterpreterWebhookConfiguration" // ResourceSingularResourceInterpreterWebhookConfiguration is singular name of ResourceInterpreterWebhookConfiguration. ResourceSingularResourceInterpreterWebhookConfiguration = "resourceinterpreterwebhookconfiguration" // ResourcePluralResourceInterpreterWebhookConfiguration is plural name of ResourceInterpreterWebhookConfiguration. ResourcePluralResourceInterpreterWebhookConfiguration = "resourceinterpreterwebhookconfigurations" // ResourceNamespaceScopedResourceInterpreterWebhookConfiguration indicates if ResourceInterpreterWebhookConfiguration is NamespaceScoped. ResourceNamespaceScopedResourceInterpreterWebhookConfiguration = false )
const GroupName = "config.karmada.io"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder // Depreciated: use Install instead AddToScheme = localSchemeBuilder.AddToScheme Install = localSchemeBuilder.AddToScheme )
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}
GroupVersion specifies the group and the version used to register the objects.
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type CustomizationRules ¶ added in v1.4.0
type CustomizationRules struct { // Retention describes the desired behavior that Karmada should react on // the changes made by member cluster components. This avoids system // running into a meaningless loop that Karmada resource controller and // the member cluster component continually applying opposite values of a field. // For example, the "replicas" of Deployment might be changed by the HPA // controller on member cluster. In this case, Karmada should retain the "replicas" // and not try to change it. // +optional Retention *LocalValueRetention `json:"retention,omitempty"` // ReplicaResource describes the rules for Karmada to discover the resource's // replica as well as resource requirements. // It would be useful for those CRD resources that declare workload types like // Deployment. // It is usually not needed for Kubernetes native resources(Deployment, Job) as // Karmada knows how to discover info from them. But if it is set, the built-in // discovery rules will be ignored. // +optional ReplicaResource *ReplicaResourceRequirement `json:"replicaResource,omitempty"` // ReplicaRevision describes the rules for Karmada to revise the resource's replica. // It would be useful for those CRD resources that declare workload types like // Deployment. // It is usually not needed for Kubernetes native resources(Deployment, Job) as // Karmada knows how to revise replicas for them. But if it is set, the built-in // revision rules will be ignored. // +optional ReplicaRevision *ReplicaRevision `json:"replicaRevision,omitempty"` // StatusReflection describes the rules for Karmada to pick the resource's status. // Karmada provides built-in rules for several standard Kubernetes types, see: // https://karmada.io/docs/userguide/globalview/customizing-resource-interpreter/#interpretstatus // If StatusReflection is set, the built-in rules will be ignored. // +optional StatusReflection *StatusReflection `json:"statusReflection,omitempty"` // StatusAggregation describes the rules for Karmada to aggregate status // collected from member clusters to resource template. // Karmada provides built-in rules for several standard Kubernetes types, see: // https://karmada.io/docs/userguide/globalview/customizing-resource-interpreter/#aggregatestatus // If StatusAggregation is set, the built-in rules will be ignored. // +optional StatusAggregation *StatusAggregation `json:"statusAggregation,omitempty"` // HealthInterpretation describes the health assessment rules by which Karmada // can assess the health state of the resource type. // +optional HealthInterpretation *HealthInterpretation `json:"healthInterpretation,omitempty"` // DependencyInterpretation describes the rules for Karmada to analyze the // dependent resources. // Karmada provides built-in rules for several standard Kubernetes types, see: // https://karmada.io/docs/userguide/globalview/customizing-resource-interpreter/#interpretdependency // If DependencyInterpretation is set, the built-in rules will be ignored. // +optional DependencyInterpretation *DependencyInterpretation `json:"dependencyInterpretation,omitempty"` }
CustomizationRules describes the interpretation rules.
func (*CustomizationRules) DeepCopy ¶ added in v1.4.0
func (in *CustomizationRules) DeepCopy() *CustomizationRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizationRules.
func (*CustomizationRules) DeepCopyInto ¶ added in v1.4.0
func (in *CustomizationRules) DeepCopyInto(out *CustomizationRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CustomizationTarget ¶ added in v1.4.0
type CustomizationTarget struct { // APIVersion represents the API version of the target resource. // +required APIVersion string `json:"apiVersion"` // Kind represents the Kind of target resources. // +required Kind string `json:"kind"` }
CustomizationTarget represents the resource type that the customization applies to.
func (*CustomizationTarget) DeepCopy ¶ added in v1.4.0
func (in *CustomizationTarget) DeepCopy() *CustomizationTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomizationTarget.
func (*CustomizationTarget) DeepCopyInto ¶ added in v1.4.0
func (in *CustomizationTarget) DeepCopyInto(out *CustomizationTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DependencyInterpretation ¶ added in v1.4.0
type DependencyInterpretation struct { // LuaScript holds the Lua script that is used to interpret the dependencies of // a specific resource. // The script should implement a function as follows: // luaScript: > // function GetDependencies(desiredObj) // dependencies = {} // if desiredObj.spec.serviceAccountName ~= "" and desiredObj.spec.serviceAccountName ~= "default" then // dependency = {} // dependency.apiVersion = "v1" // dependency.kind = "ServiceAccount" // dependency.name = desiredObj.spec.serviceAccountName // dependency.namespace = desiredObj.namespace // dependencies[1] = {} // dependencies[1] = dependency // end // return dependencies // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - desiredObj: the object represents the configuration to be applied // to the member cluster. // // The returned value should be expressed by a slice of DependentObjectReference. // +required LuaScript string `json:"luaScript"` }
DependencyInterpretation holds the rules for interpreting the dependent resources of a specific resources.
func (*DependencyInterpretation) DeepCopy ¶ added in v1.4.0
func (in *DependencyInterpretation) DeepCopy() *DependencyInterpretation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependencyInterpretation.
func (*DependencyInterpretation) DeepCopyInto ¶ added in v1.4.0
func (in *DependencyInterpretation) DeepCopyInto(out *DependencyInterpretation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DependentObjectReference ¶
type DependentObjectReference struct { // APIVersion represents the API version of the referent. // +required APIVersion string `json:"apiVersion"` // Kind represents the Kind of the referent. // +required Kind string `json:"kind"` // Namespace represents the namespace for the referent. // For non-namespace scoped resources(e.g. 'ClusterRole'),do not need specify Namespace, // and for namespace scoped resources, Namespace is required. // If Namespace is not specified, means the resource is non-namespace scoped. // +optional Namespace string `json:"namespace,omitempty"` // Name represents the name of the referent. // +required Name string `json:"name"` }
DependentObjectReference contains enough information to locate the referenced object inside current cluster.
func (*DependentObjectReference) DeepCopy ¶
func (in *DependentObjectReference) DeepCopy() *DependentObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DependentObjectReference.
func (*DependentObjectReference) DeepCopyInto ¶
func (in *DependentObjectReference) DeepCopyInto(out *DependentObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HealthInterpretation ¶ added in v1.4.0
type HealthInterpretation struct { // LuaScript holds the Lua script that is used to assess the health state of // a specific resource. // The script should implement a function as follows: // luaScript: > // function InterpretHealth(observedObj) // if observedObj.status.readyReplicas == observedObj.spec.replicas then // return true // end // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - observedObj: the object represents the configuration that is observed // from a specific member cluster. // // The returned boolean value indicates the health status. // // +required LuaScript string `json:"luaScript"` }
HealthInterpretation holds the rules for interpreting the health state of a specific resource.
func (*HealthInterpretation) DeepCopy ¶ added in v1.4.0
func (in *HealthInterpretation) DeepCopy() *HealthInterpretation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthInterpretation.
func (*HealthInterpretation) DeepCopyInto ¶ added in v1.4.0
func (in *HealthInterpretation) DeepCopyInto(out *HealthInterpretation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InterpreterOperation ¶
type InterpreterOperation string
InterpreterOperation specifies an operation for a request.
const ( // InterpreterOperationAll indicates math all InterpreterOperation. InterpreterOperationAll InterpreterOperation = "*" // InterpreterOperationInterpretReplica indicates that karmada want to figure out the replica declaration of a specific object. // Only necessary for those resource types that have replica declaration, like Deployment or similar custom resources. InterpreterOperationInterpretReplica InterpreterOperation = "InterpretReplica" // InterpreterOperationReviseReplica indicates that karmada request webhook to modify the replica. InterpreterOperationReviseReplica InterpreterOperation = "ReviseReplica" // InterpreterOperationInterpretStatus indicates that karmada want to figure out how to get the status. // Only necessary for those resource types that define their status in a special path(not '.status'). InterpreterOperationInterpretStatus InterpreterOperation = "InterpretStatus" // InterpreterOperationPrune indicates that karmada want to figure out how to package resource template to Work. InterpreterOperationPrune InterpreterOperation = "Prune" // InterpreterOperationRetain indicates that karmada request webhook to retain the desired resource template. // Only necessary for those resources which specification will be updated by their controllers running in member cluster. InterpreterOperationRetain InterpreterOperation = "Retain" // InterpreterOperationAggregateStatus indicates that karmada want to figure out how to aggregate status to resource template. // Only necessary for those resource types that want to aggregate status to resource template. InterpreterOperationAggregateStatus InterpreterOperation = "AggregateStatus" // InterpreterOperationInterpretHealth indicates that karmada want to figure out the health status of a specific object. // Only necessary for those resource types that have and want to reflect their health status. InterpreterOperationInterpretHealth InterpreterOperation = "InterpretHealth" // InterpreterOperationInterpretDependency indicates that karmada want to figure out the dependencies of a specific object. // Only necessary for those resource types that have dependencies resources and expect the dependencies be propagated // together, like Deployment depends on ConfigMap/Secret. InterpreterOperationInterpretDependency InterpreterOperation = "InterpretDependency" )
type LocalValueRetention ¶ added in v1.4.0
type LocalValueRetention struct { // LuaScript holds the Lua script that is used to retain runtime values // to the desired specification. // // The script should implement a function as follows: // luaScript: > // function Retain(desiredObj, observedObj) // desiredObj.spec.fieldFoo = observedObj.spec.fieldFoo // return desiredObj // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - desiredObj: the object represents the configuration to be applied // to the member cluster. // - observedObj: the object represents the configuration that is observed // from a specific member cluster. // // The returned object should be a retained configuration which will be // applied to member cluster eventually. // +required LuaScript string `json:"luaScript"` }
LocalValueRetention holds the scripts for retention. Now only supports Lua.
func (*LocalValueRetention) DeepCopy ¶ added in v1.4.0
func (in *LocalValueRetention) DeepCopy() *LocalValueRetention
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalValueRetention.
func (*LocalValueRetention) DeepCopyInto ¶ added in v1.4.0
func (in *LocalValueRetention) DeepCopyInto(out *LocalValueRetention)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PatchType ¶
type PatchType string
PatchType is the type of patch being used to represent the mutated object
const ( // PatchTypeJSONPatch represents the JSONType. PatchTypeJSONPatch PatchType = "JSONPatch" )
type ReplicaResourceRequirement ¶ added in v1.4.0
type ReplicaResourceRequirement struct { // LuaScript holds the Lua script that is used to discover the resource's // replica as well as resource requirements // // The script should implement a function as follows: // luaScript: > // function GetReplicas(desiredObj) // replica = desiredObj.spec.replicas // requirement = {} // requirement.nodeClaim = {} // requirement.nodeClaim.nodeSelector = desiredObj.spec.template.spec.nodeSelector // requirement.nodeClaim.tolerations = desiredObj.spec.template.spec.tolerations // requirement.resourceRequest = desiredObj.spec.template.spec.containers[1].resources.limits // return replica, requirement // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - desiredObj: the object represents the configuration to be applied // to the member cluster. // // The function expects two return values: // - replica: the declared replica number // - requirement: the resource required by each replica expressed with a // ResourceBindingSpec.ReplicaRequirements. // The returned values will be set into a ResourceBinding or ClusterResourceBinding. // +required LuaScript string `json:"luaScript"` }
ReplicaResourceRequirement holds the scripts for getting the desired replicas as well as the resource requirement of each replica.
func (*ReplicaResourceRequirement) DeepCopy ¶ added in v1.4.0
func (in *ReplicaResourceRequirement) DeepCopy() *ReplicaResourceRequirement
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaResourceRequirement.
func (*ReplicaResourceRequirement) DeepCopyInto ¶ added in v1.4.0
func (in *ReplicaResourceRequirement) DeepCopyInto(out *ReplicaResourceRequirement)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplicaRevision ¶ added in v1.4.0
type ReplicaRevision struct { // LuaScript holds the Lua script that is used to revise replicas in the desired specification. // The script should implement a function as follows: // luaScript: > // function ReviseReplica(desiredObj, desiredReplica) // desiredObj.spec.replicas = desiredReplica // return desiredObj // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - desiredObj: the object represents the configuration to be applied // to the member cluster. // - desiredReplica: the replica number should be applied with. // // The returned object should be a revised configuration which will be // applied to member cluster eventually. // +required LuaScript string `json:"luaScript"` }
ReplicaRevision holds the scripts for revising the desired replicas.
func (*ReplicaRevision) DeepCopy ¶ added in v1.4.0
func (in *ReplicaRevision) DeepCopy() *ReplicaRevision
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaRevision.
func (*ReplicaRevision) DeepCopyInto ¶ added in v1.4.0
func (in *ReplicaRevision) DeepCopyInto(out *ReplicaRevision)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RequestStatus ¶
type RequestStatus struct { // Message is human-readable description of the status of this operation. // +optional Message string `json:"message,omitempty"` // Code is the HTTP return code of this status. // +optional Code int32 `json:"code,omitempty"` }
RequestStatus holds the status of a request.
func (*RequestStatus) DeepCopy ¶
func (in *RequestStatus) DeepCopy() *RequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestStatus.
func (*RequestStatus) DeepCopyInto ¶
func (in *RequestStatus) DeepCopyInto(out *RequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInterpreterContext ¶
type ResourceInterpreterContext struct { metav1.TypeMeta `json:",inline"` // Request describes the attributes for the interpreter request. // +optional Request *ResourceInterpreterRequest `json:"request,omitempty"` // Response describes the attributes for the interpreter response. // +optional Response *ResourceInterpreterResponse `json:"response,omitempty"` }
ResourceInterpreterContext describes an interpreter context request and response.
func (*ResourceInterpreterContext) DeepCopy ¶
func (in *ResourceInterpreterContext) DeepCopy() *ResourceInterpreterContext
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterContext.
func (*ResourceInterpreterContext) DeepCopyInto ¶
func (in *ResourceInterpreterContext) DeepCopyInto(out *ResourceInterpreterContext)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceInterpreterContext) DeepCopyObject ¶
func (in *ResourceInterpreterContext) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceInterpreterCustomization ¶ added in v1.4.0
type ResourceInterpreterCustomization struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec describes the configuration in detail. // +required Spec ResourceInterpreterCustomizationSpec `json:"spec"` }
ResourceInterpreterCustomization describes the configuration of a specific resource for Karmada to get the structure. It has higher precedence than the default interpreter and the interpreter webhook.
func (*ResourceInterpreterCustomization) DeepCopy ¶ added in v1.4.0
func (in *ResourceInterpreterCustomization) DeepCopy() *ResourceInterpreterCustomization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterCustomization.
func (*ResourceInterpreterCustomization) DeepCopyInto ¶ added in v1.4.0
func (in *ResourceInterpreterCustomization) DeepCopyInto(out *ResourceInterpreterCustomization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceInterpreterCustomization) DeepCopyObject ¶ added in v1.4.0
func (in *ResourceInterpreterCustomization) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceInterpreterCustomizationList ¶ added in v1.4.0
type ResourceInterpreterCustomizationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ResourceInterpreterCustomization `json:"items"` }
ResourceInterpreterCustomizationList contains a list of ResourceInterpreterCustomization.
func (*ResourceInterpreterCustomizationList) DeepCopy ¶ added in v1.4.0
func (in *ResourceInterpreterCustomizationList) DeepCopy() *ResourceInterpreterCustomizationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterCustomizationList.
func (*ResourceInterpreterCustomizationList) DeepCopyInto ¶ added in v1.4.0
func (in *ResourceInterpreterCustomizationList) DeepCopyInto(out *ResourceInterpreterCustomizationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceInterpreterCustomizationList) DeepCopyObject ¶ added in v1.4.0
func (in *ResourceInterpreterCustomizationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceInterpreterCustomizationSpec ¶ added in v1.4.0
type ResourceInterpreterCustomizationSpec struct { // CustomizationTarget represents the resource type that the customization applies to. // +required Target CustomizationTarget `json:"target"` // Customizations describe the interpretation rules. // +required Customizations CustomizationRules `json:"customizations"` }
ResourceInterpreterCustomizationSpec describes the configuration in detail.
func (*ResourceInterpreterCustomizationSpec) DeepCopy ¶ added in v1.4.0
func (in *ResourceInterpreterCustomizationSpec) DeepCopy() *ResourceInterpreterCustomizationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterCustomizationSpec.
func (*ResourceInterpreterCustomizationSpec) DeepCopyInto ¶ added in v1.4.0
func (in *ResourceInterpreterCustomizationSpec) DeepCopyInto(out *ResourceInterpreterCustomizationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInterpreterRequest ¶
type ResourceInterpreterRequest struct { // UID is an identifier for the individual request/response. // The UID is meant to track the round trip (request/response) between the karmada and the WebHook, not the user request. // It is suitable for correlating log entries between the webhook and karmada, for either auditing or debugging. // +required UID types.UID `json:"uid"` // Kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale) // +required Kind metav1.GroupVersionKind `json:"kind"` // Name is the name of the object as presented in the request. // +required Name string `json:"name"` // Namespace is the namespace associated with the request (if any). // +optional Namespace string `json:"namespace,omitempty"` // Operation is the operation being performed. // +required Operation InterpreterOperation `json:"operation"` // Object is the object from the incoming request. // +optional Object runtime.RawExtension `json:"object,omitempty"` // ObservedObject is the object observed from the kube-apiserver of member clusters. // Not nil only when InterpreterOperation is InterpreterOperationRetain. // +optional ObservedObject *runtime.RawExtension `json:"observedObject,omitempty"` // DesiredReplicas represents the desired pods number which webhook should revise with. // It'll be set only if InterpreterOperation is InterpreterOperationReviseReplica. // +optional DesiredReplicas *int32 `json:"replicas,omitempty"` // AggregatedStatus represents status list of the resource running in each member cluster. // It'll be set only if InterpreterOperation is InterpreterOperationAggregateStatus. // +optional AggregatedStatus []workv1alpha2.AggregatedStatusItem `json:"aggregatedStatus,omitempty"` }
ResourceInterpreterRequest describes the interpreter.Attributes for the interpreter request.
func (*ResourceInterpreterRequest) DeepCopy ¶
func (in *ResourceInterpreterRequest) DeepCopy() *ResourceInterpreterRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterRequest.
func (*ResourceInterpreterRequest) DeepCopyInto ¶
func (in *ResourceInterpreterRequest) DeepCopyInto(out *ResourceInterpreterRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInterpreterResponse ¶
type ResourceInterpreterResponse struct { // UID is an identifier for the individual request/response. // This must be copied over from the corresponding ResourceInterpreterRequest. // +required UID types.UID `json:"uid"` // Successful indicates whether the request be processed successfully. // +required Successful bool `json:"successful"` // Status contains extra details information about why the request not successful. // This filed is not consulted in any way if "Successful" is "true". // +optional Status *RequestStatus `json:"status,omitempty"` // The patch body. We only support "JSONPatch" currently which implements RFC 6902. // +optional Patch []byte `json:"patch,omitempty"` // The type of Patch. We only allow "JSONPatch" currently. // +optional PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"` // ReplicaRequirements represents the requirements required by each replica. // Required if InterpreterOperation is InterpreterOperationInterpretReplica. // +optional ReplicaRequirements *workv1alpha2.ReplicaRequirements `json:"replicaRequirements,omitempty"` // Replicas represents the number of desired pods. This is a pointer to distinguish between explicit // zero and not specified. // Required if InterpreterOperation is InterpreterOperationInterpretReplica. // +optional Replicas *int32 `json:"replicas,omitempty"` // Dependencies represents the reference of dependencies object. // Required if InterpreterOperation is InterpreterOperationInterpretDependency. // +optional Dependencies []DependentObjectReference `json:"dependencies,omitempty"` // RawStatus represents the referencing object's status. // +optional RawStatus *runtime.RawExtension `json:"rawStatus,omitempty"` // Healthy represents the referencing object's healthy status. // +optional Healthy *bool `json:"healthy,omitempty"` }
ResourceInterpreterResponse describes an interpreter response.
func (*ResourceInterpreterResponse) DeepCopy ¶
func (in *ResourceInterpreterResponse) DeepCopy() *ResourceInterpreterResponse
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterResponse.
func (*ResourceInterpreterResponse) DeepCopyInto ¶
func (in *ResourceInterpreterResponse) DeepCopyInto(out *ResourceInterpreterResponse)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInterpreterWebhook ¶
type ResourceInterpreterWebhook struct { // Name is the full-qualified name of the webhook. // +required Name string `json:"name"` // ClientConfig defines how to communicate with the hook. // +required ClientConfig admissionregistrationv1.WebhookClientConfig `json:"clientConfig"` // Rules describes what operations on what resources the webhook cares about. // The webhook cares about an operation if it matches any Rule. // +optional Rules []RuleWithOperations `json:"rules,omitempty"` // TimeoutSeconds specifies the timeout for this webhook. After the timeout passes, // the webhook call will be ignored or the API call will fail based on the // failure policy. // The timeout value must be between 1 and 30 seconds. // Default to 10 seconds. // +optional TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` // InterpreterContextVersions is an ordered list of preferred `ResourceInterpreterContext` // versions the Webhook expects. Karmada will try to use first version in // the list which it supports. If none of the versions specified in this list // supported by Karmada, validation will fail for this object. // If a persisted webhook configuration specifies allowed versions and does not // include any versions known to the Karmada, calls to the webhook will fail // and be subject to the failure policy. InterpreterContextVersions []string `json:"interpreterContextVersions"` }
ResourceInterpreterWebhook describes the webhook as well as the resources and operations it applies to.
func (*ResourceInterpreterWebhook) DeepCopy ¶
func (in *ResourceInterpreterWebhook) DeepCopy() *ResourceInterpreterWebhook
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterWebhook.
func (*ResourceInterpreterWebhook) DeepCopyInto ¶
func (in *ResourceInterpreterWebhook) DeepCopyInto(out *ResourceInterpreterWebhook)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInterpreterWebhookConfiguration ¶
type ResourceInterpreterWebhookConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Webhooks is a list of webhooks and the affected resources and operations. // +required Webhooks []ResourceInterpreterWebhook `json:"webhooks"` }
ResourceInterpreterWebhookConfiguration describes the configuration of webhooks which take the responsibility to tell karmada the details of the resource object, especially for custom resources.
func (*ResourceInterpreterWebhookConfiguration) DeepCopy ¶
func (in *ResourceInterpreterWebhookConfiguration) DeepCopy() *ResourceInterpreterWebhookConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterWebhookConfiguration.
func (*ResourceInterpreterWebhookConfiguration) DeepCopyInto ¶
func (in *ResourceInterpreterWebhookConfiguration) DeepCopyInto(out *ResourceInterpreterWebhookConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceInterpreterWebhookConfiguration) DeepCopyObject ¶
func (in *ResourceInterpreterWebhookConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ResourceInterpreterWebhookConfigurationList ¶
type ResourceInterpreterWebhookConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items holds a list of ResourceInterpreterWebhookConfiguration. Items []ResourceInterpreterWebhookConfiguration `json:"items"` }
ResourceInterpreterWebhookConfigurationList contains a list of ResourceInterpreterWebhookConfiguration.
func (*ResourceInterpreterWebhookConfigurationList) DeepCopy ¶
func (in *ResourceInterpreterWebhookConfigurationList) DeepCopy() *ResourceInterpreterWebhookConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInterpreterWebhookConfigurationList.
func (*ResourceInterpreterWebhookConfigurationList) DeepCopyInto ¶
func (in *ResourceInterpreterWebhookConfigurationList) DeepCopyInto(out *ResourceInterpreterWebhookConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ResourceInterpreterWebhookConfigurationList) DeepCopyObject ¶
func (in *ResourceInterpreterWebhookConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Rule ¶
type Rule struct { // APIGroups is the API groups the resources belong to. '*' is all groups. // If '*' is present, the length of the slice must be one. // For example: // ["apps", "batch", "example.io"] means matches 3 groups. // ["*"] means matches all group // // Note: The group cloud be empty, e.g the 'core' group of kubernetes, in that case use [""]. // +required APIGroups []string `json:"apiGroups"` // APIVersions is the API versions the resources belong to. '*' is all versions. // If '*' is present, the length of the slice must be one. // For example: // ["v1alpha1", "v1beta1"] means matches 2 versions. // ["*"] means matches all versions. // +required APIVersions []string `json:"apiVersions"` // Kinds is a list of resources this rule applies to. // If '*' is present, the length of the slice must be one. // For example: // ["Deployment", "Pod"] means matches Deployment and Pod. // ["*"] means apply to all resources. // +required Kinds []string `json:"kinds"` }
Rule is a tuple of APIGroups, APIVersion, and Kinds.
func (*Rule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleWithOperations ¶
type RuleWithOperations struct { // Operations is the operations the hook cares about. // If '*' is present, the length of the slice must be one. // +required Operations []InterpreterOperation `json:"operations"` // Rule is embedded, it describes other criteria of the rule, like // APIGroups, APIVersions, Kinds, etc. Rule `json:",inline"` }
RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.
func (*RuleWithOperations) DeepCopy ¶
func (in *RuleWithOperations) DeepCopy() *RuleWithOperations
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleWithOperations.
func (*RuleWithOperations) DeepCopyInto ¶
func (in *RuleWithOperations) DeepCopyInto(out *RuleWithOperations)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusAggregation ¶ added in v1.4.0
type StatusAggregation struct { // LuaScript holds the Lua script that is used to aggregate decentralized statuses // to the desired specification. // The script should implement a function as follows: // luaScript: > // function AggregateStatus(desiredObj, statusItems) // for i = 1, #statusItems do // desiredObj.status.readyReplicas = desiredObj.status.readyReplicas + items[i].readyReplicas // end // return desiredObj // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - desiredObj: the object represents a resource template. // - statusItems: the slice of status expressed with AggregatedStatusItem. // // The returned object should be a whole object with status aggregated. // // +required LuaScript string `json:"luaScript"` }
StatusAggregation holds the scripts for aggregating several decentralized statuses.
func (*StatusAggregation) DeepCopy ¶ added in v1.4.0
func (in *StatusAggregation) DeepCopy() *StatusAggregation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusAggregation.
func (*StatusAggregation) DeepCopyInto ¶ added in v1.4.0
func (in *StatusAggregation) DeepCopyInto(out *StatusAggregation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusReflection ¶ added in v1.4.0
type StatusReflection struct { // LuaScript holds the Lua script that is used to get the status from the observed specification. // The script should implement a function as follows: // luaScript: > // function ReflectStatus(observedObj) // status = {} // status.readyReplicas = observedObj.status.observedObj // return status // end // // The content of the LuaScript needs to be a whole function including both // declaration and implementation. // // The parameters will be supplied by the system: // - observedObj: the object represents the configuration that is observed // from a specific member cluster. // // The returned status could be the whole status or part of it and will // be set into both Work and ResourceBinding(ClusterResourceBinding). // +required LuaScript string `json:"luaScript"` }
StatusReflection holds the scripts for getting the status.
func (*StatusReflection) DeepCopy ¶ added in v1.4.0
func (in *StatusReflection) DeepCopy() *StatusReflection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusReflection.
func (*StatusReflection) DeepCopyInto ¶ added in v1.4.0
func (in *StatusReflection) DeepCopyInto(out *StatusReflection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.