CN116450598A - Resource data processing method and device, electronic equipment and storage medium - Google Patents
Resource data processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116450598A CN116450598A CN202310270591.3A CN202310270591A CN116450598A CN 116450598 A CN116450598 A CN 116450598A CN 202310270591 A CN202310270591 A CN 202310270591A CN 116450598 A CN116450598 A CN 116450598A
- Authority
- CN
- China
- Prior art keywords
- definition
- interface
- data
- resource data
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 66
- 238000012545 processing Methods 0.000 claims description 19
- 230000002085 persistent effect Effects 0.000 claims description 16
- 238000004891 communication Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 5
- 230000002688 persistence Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 12
- 230000006870 function Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 8
- 235000009854 Cucurbita moschata Nutrition 0.000 description 5
- 240000001980 Cucurbita pepo Species 0.000 description 5
- 235000009852 Cucurbita pepo Nutrition 0.000 description 5
- 235000020354 squash Nutrition 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- RJKFOVLPORLFTN-LEKSSAKUSA-N Progesterone Chemical compound C1CC2=CC(=O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@H](C(=O)C)[C@@]1(C)CC2 RJKFOVLPORLFTN-LEKSSAKUSA-N 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000002730 additional effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 244000145841 kine Species 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000005236 sound signal Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/18—File system types
- G06F16/182—Distributed file systems
- G06F16/1824—Distributed file systems implemented using Network-attached Storage [NAS] architecture
- G06F16/183—Provision of network file services by network file servers, e.g. by using NFS, CIFS
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4488—Object-oriented
- G06F9/449—Object-oriented method invocation or resolution
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a resource data processing method, a device, electronic equipment and a storage medium, which relate to the technical field of network file system management, and are characterized in that a definition rule of a container cloud arrangement system is determined, and a custom resource definition interface for network file system server equipment is generated based on the definition rule; determining target resource data through the definition rule; the target resource data has a corresponding target service; the target resource data is acquired based on the self-defined resource definition interface, and the target service is executed based on the target resource data, so that the problem that a user must process storage logic corresponding to service types simultaneously when acquiring resource data of different service types is avoided, and the service efficiency of the network file system NFS is improved.
Description
Technical Field
The present invention relates to the field of network file system management, and in particular, to a resource data processing method, a resource data processing apparatus, an electronic device, and a computer readable storage medium.
Background
The network file system, english Network File System (NFS), is a UNIX presentation layer protocol (presentation layer protocol) that enables a user to access files elsewhere on the network just as if the computer were in use.
In the prior art, when the network file system NFS is deployed, the service clusters and the storage clusters are not divided, so that when a user acquires service resource data, the user needs to know storage bottom storage logic corresponding to different service data for different service resource data, and the service resource data can be acquired, which results in low use efficiency for the network file system NFS.
Disclosure of Invention
The embodiment of the invention provides a resource data processing method, a device, electronic equipment and a computer readable storage medium, which are used for solving the problem of how to improve the use efficiency of a Network File System (NFS).
The embodiment of the invention discloses a resource data processing method, which is characterized in that the method is applied to a client, the client is configured with a corresponding container cloud arrangement system, the client is provided with corresponding network file system service end equipment, and the method comprises the following steps:
determining definition rules of the container cloud orchestration system, and generating a custom resource definition interface for the network file system server device based on the definition rules;
Determining target resource data through the definition rule; the target resource data has a corresponding target service;
and acquiring the target resource data based on the custom resource definition interface, and executing the target service based on the target resource data.
Optionally, the step of determining the definition rules of the container cloud orchestration system may comprise:
interface version information of the interface defined by the user-defined resource is determined, and the interface version information is used as a definition rule;
determining interface class information of the interface defined by the custom resource as custom resource definition, and taking the interface class information as definition rules;
determining storage metadata information with a first association relation with the network file system server-side equipment, and taking the storage metadata information as a definition rule, so that the container cloud arrangement system identifies the association relation between the custom resource definition interface and the storage metadata based on the storage metadata information;
determining interface name information with a second association relation with the network file system server-side equipment, and taking the interface name information as a definition rule, so that the container cloud orchestration system identifies the association relation between the custom resource definition interface and the network file system server-side equipment based on the interface name information;
Interface specification information of the interface defined by the user-defined resource is determined, and the interface specification information is used as a definition rule; the interface specification information comprises data scope information for the storage metadata, and the data scope information is used for determining the data scope of the storage metadata with an association relation with the custom resource definition interface.
Optionally, the method may further include:
and determining the data category information of the returned data of the network file system server-side equipment, and taking the data category information as a definition rule.
Optionally, the cloud orchestration system includes a first controller, and may further include:
describing the definition rule to the first controller.
Optionally, the cloud orchestration system is configured to generate persistent storage claim information, and may further include:
and determining the claim category information of the claim information stored for the persistence, and taking the claim category information as a definition rule.
Optionally, the method may further include:
determining a database field of a daemon for the custom resource definition interface, and taking the database field as a definition rule, so that when the database field is read, the definition resource definition interface is restarted.
Optionally, the step of determining the target resource data by the definition rule may include:
determining an association relationship between the custom resource definition interface and the network file system server equipment based on the interface version information, the interface category information and the interface name information;
and determining target resource data through the data range information.
Optionally, the method may further include:
and making a persistent volume declaration for the custom resource definition interface to the network file system server device based on the declaration category information.
Optionally, the method may further include:
acquiring a new service, and determining a new definition rule corresponding to the new service;
when the newly added definition rule is monitored, analyzing the newly added definition rule by adopting the first controller, and generating a newly added custom resource definition interface aiming at the newly added definition rule;
acquiring newly-added target resource data corresponding to the newly-added custom resource definition interface based on the newly-added custom resource definition interface, and executing the newly-added target service based on the newly-added target resource data; the newly added custom resource definition interface has a corresponding authority account number.
Optionally, the custom resource definition may have a corresponding distributed key value pair storage system, and further includes:
and writing the newly-added definition rule into the distributed key value pair storage system by adopting the newly-added definition resource definition interface.
Optionally, the method may further include:
creating a second controller for the container cloud orchestration system, and scanning storage nodes of the network file system server-side equipment through the second controller to determine available disks from the network file system server-side equipment.
Optionally, the method may further include:
creating a storage pool by using the available disk;
creating a data copy for the target resource data and storing the data copy in the storage pool.
The embodiment of the invention also discloses a resource data processing method which is applied to network file system server equipment, wherein the network file system server equipment is provided with a corresponding client, and the client is used for determining definition rules of the container cloud arrangement system and generating a custom resource definition interface aiming at the network file system server equipment based on the definition rules; determining target resource data through the definition rule; the target resource data has a corresponding target service, and may include:
Transmitting the target resource data to the client based on the custom resource definition interface; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
The embodiment of the invention also discloses a resource data processing device, which is applied to a client, wherein the client is configured with a corresponding container cloud arrangement system and is provided with corresponding network file system service end equipment, and the device can comprise:
the definition rule determining module is used for determining definition rules of the container cloud orchestration system and generating a custom resource definition interface for the network file system server device based on the definition rules;
the target resource data determining module is used for determining target resource data through the definition rule; the target resource data has a corresponding target service;
and the target resource data acquisition module is used for acquiring the target resource data based on the custom resource definition interface and executing the target service based on the target resource data.
The embodiment of the invention also discloses a resource data processing device which is applied to network file system server equipment, wherein the network file system server equipment is provided with a corresponding client, and the client is used for determining definition rules of the container cloud arrangement system and generating a custom resource definition interface aiming at the network file system server equipment based on the definition rules; determining target resource data through the definition rule; the target resource data has a corresponding target service, and may include:
The target resource data sending module is used for sending the target resource data to the client based on the user-defined resource definition interface; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
The embodiment of the invention also discloses electronic equipment, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the method according to the embodiment of the present invention when executing the program stored in the memory.
Embodiments of the present invention also disclose a computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method according to the embodiments of the present invention.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, the definition rule of the container cloud arrangement system is determined, and a custom resource definition interface aiming at the network file system server equipment is generated based on the definition rule; determining target resource data through the definition rule; the target resource data has a corresponding target service; the target resource data is acquired based on the self-defined resource definition interface, and the target service is executed based on the target resource data, so that the problem that a user must process storage logic corresponding to service types simultaneously when acquiring resource data of different service types is avoided, and the service efficiency of the network file system NFS is improved.
Drawings
FIG. 1 is a flowchart showing steps of a method for processing resource data according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a management of NFS file storage full cycles for multiple scenarios provided in an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first controller according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for processing resource data according to a second embodiment of the present invention;
FIG. 5 is a block diagram showing a configuration of a resource data processing device according to a third embodiment of the present invention;
FIG. 6 is a block diagram showing a resource data processing apparatus according to a fourth embodiment of the present invention;
fig. 7 is a block diagram of a hardware structure of an electronic device according to embodiments of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Container orchestration technology, which refers to the deployment, management and monitoring of multiple containers, is closely related to the evolution of system complexity to drive service deployment.
Kubernetes, also known as k8s, provides orchestration functions such as container deployment, management, and capacity expansion, as desired by the user.
Custom Resource Definition (CRD for short), which is a resource of Kubernetes itself, allows users to customize new resource types, and CRD allows users to expand cluster capabilities based on existing Kubernetes resources, e.g., deployment, configmap, etc.
Aiming at the existing network file system NFS, as one of the core invention points of the embodiment of the invention, a method for flexibly managing the full period of the NFS file storage aiming at multiple scenes is provided, a corresponding custom resource definition interface CRDApi is generated for NFS service through the Kubernetes, a storage cluster and a cloud native cluster can be effectively combined, and the resource consumption is reduced through the use of the internal resources of the cluster for storage and the access to NFS service equipment. In addition, the user does not need to know the underlying principle of storage, only needs to maintain the storage service through a custom resource definition interface CRDApi, and keeps the storage cluster stable by relying on the self HA function of Kubernetes, namely, simultaneously meets the requirement of the service on file storage and reduces the deployment and operation cost of storage.
Example 1
Referring to fig. 1, a step flowchart of a resource data processing method provided in an embodiment of the present invention is shown, and may specifically include the following steps:
step 101, determining definition rules of the container cloud orchestration system, and generating a custom resource definition interface for the network file system server device based on the definition rules;
102, determining target resource data through the definition rule; the target resource data has a corresponding target service;
step 103, obtaining the target resource data based on the custom resource definition interface, and executing the target service based on the target resource data.
The embodiment of the invention can be applied to a client, the client can be configured with a corresponding container cloud orchestration system Kubernetes, the client is provided with a corresponding network file system server device NFSSERVER, the definition rules of the container cloud orchestration system Kubernetes can be determined, and a custom resource definition interface CRDApi aiming at the network file system server device NFSSERVER is defined according to the definition rules of the container cloud orchestration system Kubernetes, so that the custom resource definition interface CRDApi is obtained.
In practical applications, the CRD is essentially a Schema of an Open interface Open Api, and creating a custom resource definition interface CRDApi may be understood as creating an interface service ApiServer that registers a new resource to the container cloud orchestration system Kubernetes cluster, and a definition rule may be used to inform the container cloud orchestration system Kubernetes of the legal definition of the resource, for example, an interface name, an interface type, an interface specification, a correspondence with a network file system server device nfsservers, and so on.
The embodiment of the invention can determine the target resource data through the definition rule, specifically, the storage metadata can be defined according to the definition rule based on the user-defined resource definition interface CRDApi which is defined for the network file system server equipment nfsservers before, for example, the copy number and the read-write type of the metadata are defined, so as to determine the target resource data.
Optionally, the system server device NFSSERVER of the embodiment of the present invention may be configured with a dedicated mirror space, where the mirror space may be used to store target resource data, so as to avoid the target resource data from affecting the original data, so as to improve the stability of the system server device NFSSERVER.
In the embodiment of the invention, after the custom resource definition interface CRDApi is generated and the target resource data is determined, the target resource data can be acquired based on the custom resource definition interface, and the target business can be executed based on the target resource data.
In a specific implementation, the embodiment of the invention can analyze the resource file through the custom resource definition interface CRDApi, and deploy and operate the service through the first controller of the container cloud orchestration system Kubernetes.
According to the embodiment of the invention, the definition rule of the container cloud arrangement system is determined, and a custom resource definition interface aiming at the network file system server equipment is generated based on the definition rule; determining target resource data through the definition rule; the target resource data has a corresponding target service; the target resource data is acquired based on the self-defined resource definition interface, and the target service is executed based on the target resource data, so that the problem that a user must process storage logic corresponding to service types simultaneously when acquiring resource data of different service types is avoided, and the service efficiency of the network file system NFS is improved.
On the basis of the above embodiments, modified embodiments of the above embodiments are proposed, and it is to be noted here that only the differences from the above embodiments are described in the modified embodiments for the sake of brevity of description.
In an optional embodiment of the present invention, the custom resource definition interface of the embodiment of the present invention may be configured with a corresponding rights account, the rights account may be opened to a user outside the Kubernetes cluster of the container cloud orchestration system, and the external user may call the custom resource definition interface CRDApi under the constraint of the rights account to obtain the target resource data, so as to further improve the use efficiency of the network file system NFS.
In an alternative embodiment of the present invention, the step of determining definition rules of the container cloud orchestration system comprises: interface version information of the interface defined by the user-defined resource is determined, and the interface version information is used as a definition rule; determining interface class information of the interface defined by the custom resource as custom resource definition, and taking the interface class information as definition rules; determining storage metadata information with a first association relation with the network file system server-side equipment, and taking the storage metadata information as a definition rule, so that the container cloud arrangement system identifies the association relation between the custom resource definition interface and the storage metadata based on the storage metadata information; determining interface name information with a second association relation with the network file system server-side equipment, and taking the interface name information as a definition rule, so that the container cloud orchestration system identifies the association relation between the custom resource definition interface and the network file system server-side equipment based on the interface name information; interface specification information of the interface defined by the user-defined resource is determined, and the interface specification information is used as a definition rule; the interface specification information comprises data scope information for the storage metadata, and the data scope information is used for determining the data scope of the storage metadata with an association relation with the custom resource definition interface.
The determination for the interface version information, the interface class information, the storage metadata information, the interface name information may be implemented by the following code, for example.
apiVersion:apiextensions.k8s.io/v1;kind:CustomResourceDefinition;metadata:annotations:controller-gen.kubebuilder.io/version:tianyiv1beta;creationTimestamp:null;name:nfsservers;spec:group:nfs;names:kind:NFSServer;listKind:NFSServerList;plural:nfsservers;singular:nfsserver;scope:Namespaced.
The interface version information comprises interface version information, interface version information and a declaration code, wherein the interface version information is the version of the api of the appointed k8s, and tells the user-defined resource definition interface CRD of the version to explain the declaration code; the type of the file is defined as a custom resource definition CRD file, and the cluster is informed of the type definition of an interface extension; storing metadata information metadata, which can be used to represent metadata, designating the metadata as v1beta version of the target service type, defining the interface name information of the interface as nfsservers, and then analyzing the target resource data according to the definition of the CRD if a file declared as nfsservers type exists; the interface specification information spec is a detailed description and definition of this CRD, the name and type name of the service definition group of NFS, and to which nacispace the NFS service needs to be declared to correspond.
Optionally, the method further comprises: and determining the data category information of the returned data of the network file system server-side equipment, and taking the data category information as a definition rule.
The determination of the data category information may be implemented, for example, by the following code.
versions:-additionalPrinterColumns:-jsonPath:.metadata.creationTimestamp;name:AGE;type:date;-description:NFS Server instance state;jsonPath:.status.state;name:State;type:string;name:v1alpha1.
The code may be used for defining data returned by the NFS service, where the time name created by the data category information versions definition is an age and the type is a date type. The state name returned is state and the type is string. Name expresses the defined interface version.
Optionally, the cloud orchestration system comprises a first controller, further comprising: describing the definition rule to the first controller.
In practical applications, in addition to CRD, a first Controller needs to be provided for the user to implement the operation logic of the user, so in the embodiment of the present invention, definition rules need to be described for the first Controller.
Illustratively, the definition rules may be described to the first controller by the following code implementation.
schema:openAPIV3Schema:description:NFSServer is the Schema for the nfsservers API;properties:apiVersion:description:'APIVersion defines the versioned schema of this representation of an object.Servers should convert recognized schemas to the latest inttaernal value,and may reject unrecognized values.type:string;kind:description:'Kind is a string value representing the REST resource this object represents.Servers may infer this from the endpoint the client submits requests to.Cannot be updated.In CamelCase.More info:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds';type:string;metadata:type:object;spec:description:NFSServerSpec represents the spec of NFS daemon;properties:annotations:additionalProperties:type:string;type:object;exports:description:The parameters to configure the NFS export;items:description:ExportsSpec represents the spec of NFS exports;properties:name:description:Name of the export;type:string.
By means of the code, the form information schma of the custom resource definition interface can be defined, including version of api, kined type, metadata type, and description of these types, and can be claimed to be later declared according to the form information schma of the interface when the first controller is declared.
Optionally, the cloud orchestration system is configured to generate persistent storage claim information, and further includes: and determining the claim category information of the claim information stored for the persistence, and taking the claim category information as a definition rule.
In practice the persistent volume claim (PersistentVolumeClaim, PVC) expresses a user request for storage. Just as Pod consumes resources of Node, PVC consumes PV resources. The PVC may apply for the size (size) of the memory space and the access pattern.
The embodiment of the invention can realize the determination of the claim category information through the following codes.
persistentVolumeClaim:description:PVC from which the NFS daemon gets storage for sharing;properties:claimName;type:string;readOnly:description:Will force the ReadOnly setting in VolumeMounts.Default false.type:boolean;required:-claimName;type:object;server:description:The NFS server configuration;properties:accessMode:description:Reading and Writing permissions on the export Valid values are"ReadOnly","ReadWrite"and"none";enum:-ReadOnly-ReadWrite-none;type:string;allowedClients:description:The clients allowed to access the NFS export;items:description:AllowedClientsSpec represents the client specs for accessing the NFS export;properties:accessMode:description:Reading and Writing permissions for the client to access the NFS export Valid values are"ReadOnly","ReadWrite"and"none"Gets overridden when ServerSpec.accessMode is specified;enum:-ReadOnly-ReadWrite-none;type:string;clients:description:The clients that can access the share Values can be hostname,ip address,netgroup,CIDR network address,or all;items:type:string;type:array;name:description:Name of the clients group.
Through the above code, the type and name of the persistent storage pvc can be defined, and different types of data need to be defined, for example, whether the persistent data is single-node readable-writable, multi-node readable-writable, or single-node read-only, multi-node read-only, or the like.
Optionally, the method further comprises: determining a database field of a daemon for the custom resource definition interface, and taking the database field as a definition rule, so that when the database field is read, the definition resource definition interface is restarted.
The determination of the database field may be implemented, for example, by the following code.
type:string;squash:description:Squash options for clients Valid values are"none","rootid","root",and"all"Gets overridden when ServerSpec.squash is specified;enum:-none-rootid-root-all;type:string;type:object;type:array;squash:description:This prevents the root users connected remotely from having root privileges Valid values are"none","rootid","root",and"all";enum:-none-rootid-root-alltype:string;type:object;type:object;type:array;replicas:description:Replicas of the NFS daemon;type:integer;type:object;status:description:NFSServerStatus defines the observed state of NFSServer;properties:message:type:string;reason:type:string;state:type:stringtype:object;type:object;served:true;storage:true;subresources:status:{};status:acceptedNames:kind:""plural:""conditions:[]storedVersions:[]
Through the codes, a daemon root corresponding to the NFS service is defined and determined, a database field rootid corresponding to the process root is to be acquired, the service is defined as a daemon, and once the abnormal service needs to be automatically restarted for restoration.
The determination of the definition rules may be completed so far, and a custom resource definition interface for the network file system server device may be generated based on the definition rules.
In an alternative embodiment of the present invention, the step of determining the target resource data by the definition rule includes: determining an association relationship between the custom resource definition interface and the network file system server equipment based on the interface version information, the interface category information and the interface name information; and determining target resource data through the data range information.
The method comprises the steps of determining the association relation between the custom resource definition interface and the network file system server equipment based on the interface version information, the interface category information and the interface name information by using the following codes; and determining target resource data through the data range information.
apiVersion:v1;kind:NFSServer;metadata:name:nfs;namespace:nfs;spec:replicas:1;exports:-name:share1;server:accessMode:ReadWrite;squash:"none";#A Persistent Volume Claim must be created before creating NFS CRD instance.persistentVolumeClaim:claimName:nfs-default-claim.
Through the code, the version of the custom resource definition interface can be designated as v1, and since the definition rule already defines that the type of the custom resource definition interface is nfsserver, then kine can designate nfsserver to inform k8s cluster to parse with the definition of the type of the custom resource definition interface as nfsserver, define the name of NFS service and the name of the nacespace where NFS service is located, describe the number of the copies as 1, and use type service as export and be readable and writable.
Optionally, the method further comprises: and making a persistent volume declaration for the custom resource definition interface to the network file system server device based on the declaration category information.
Illustratively, making a persistent volume declaration for the custom resource definition interface to the network file system server device based on the declaration category information may be accomplished by code.
kind:PersistentVolumeClaimmetadata;name:nfs-default-claim;namespace:nfs;spec:accessModes:-ReadWriteMany;resources:requests:storage:1Gi.
Through the codes, the persistent PVC can be declared and defined, and the description of the description information of the PVC in the declaration category information is declared.
Optionally, the method further comprises: acquiring a new service, and determining a new definition rule corresponding to the new service; when the newly added definition rule is monitored, analyzing the newly added definition rule by adopting the first controller, and generating a newly added custom resource definition interface aiming at the newly added definition rule; acquiring newly-added target resource data corresponding to the newly-added custom resource definition interface based on the newly-added custom resource definition interface, and executing the newly-added target service based on the newly-added target resource data; the newly added custom resource definition interface has a corresponding authority account; the custom resource definition has a corresponding distributed key value pair storage system, and further includes: and writing the newly-added definition rule into the distributed key value pair storage system by adopting the newly-added definition resource definition interface.
In practical applications, the distributed key value pair storage system etcd is typically used for configuration management, service discovery, and distributed coordination work in a distributed system.
The definition of the CRD may be parsed, when the k8s cluster monitors that the definition rule is modified, a newly-added custom resource definition interface corresponding to the newly-added service is created, the content of the definition rule is checked, the definition conforming to the k8s is received by the newly-added custom resource definition interface and written into the etcd, and the first controller may add the definition rule, so as to implement resource control, and further, the newly-added custom resource definition interface may also have a corresponding authority account number so as to be opened to a user outside the k8s cluster.
In an alternative embodiment of the present invention, further comprising:
creating a second controller for the container cloud orchestration system, and scanning storage nodes of the network file system server-side equipment through the second controller to determine available disks from the network file system server-side equipment.
In a specific implementation, the embodiment of the invention can create a controller program damonset as the second controller, and perform resource judgment on the cluster server node through the judgment function by the second controller, scan all the disks, and if the disk is not partitioned by formatting and the redundancy value of the resource is greater than a preset threshold, the disk can be determined and marked as an available disk.
Illustratively, the judgment function may be implemented by the following code:
go udevBlockMonitor(udevEvents,udevEventPeriod);for{;select{;case<-sigc:;logger.Infof("shutdown signal received,exiting...")return nil;case<-time.After(probeInterval):;if err:=updateDeviceCM(context);err!=nil{;logger.Errorf("failed to update device configmap during probe interval.%v",err);};case_,ok:=<-udevEvents:;if ok{;logger.Info("trigger probe from udev event");if err:=updateDeviceCM(context);err!=nil{;logger.Errorf("failed to update device configmap triggered from udev event.%v",err);};}else{;logger.Warningf("disabling udev monitoring");udevEvents=nil;};};};}
in an alternative embodiment of the present invention, further comprising:
creating a storage pool by using the available disk;
creating a data copy for the target resource data and storing the data copy in the storage pool.
In a specific implementation, after determining the available disks, the embodiment of the invention can create a storage pool datapool with one or more marked available disks, and can create a data copy for the target resource data according to a preset rule, for example, the preset copy number creates the data copy for the target resource data, and the data copy is stored in the storage pool datapool to ensure the data security.
Illustratively, this may be implemented by the following code.
apiVersion:app/v1;kind:nfs;metadata:;name:mynfs;namespace:nfs;spec:;dataPools:;-failureDomain:host;name:replicated;parameters:;
compression_mode: none; replicated:; requireSafeReplica size: true; size 3// data 3 copies; metadataPool; ERASUReCode; codingChunks:0; dataChunks:0; parameters:; compression_mode: none; replicated:; requireSafeReplica size: true; size 3; metaataServer:; active count 1; active standby: true; livenessProbe:; disabled: false; the priority ClassName is system-cluster-critical; startupProbe:;
disabled:false;preserveFilesystemOnDelete:true
In order that those skilled in the art will better understand the embodiments of the present invention, an example will be described below.
Referring to fig. 2, fig. 2 is a schematic flow chart of management of full cycles of NFS file storage for multiple scenes according to an embodiment of the present invention, and defined according to CRD interfaces of rules pair NFSSERVER of the orchestration system; according to the interface definition of CRD, declaring the needed storage resource; the required NFS service is made into a special mirror image; applying for resources inside the cluster according to the requirements, and creating account rights used by the cluster and resources of a first controller of the cluster; and analyzing the resource file through the api, and deploying and operating the service through the internal first controller.
Specifically, the unified asynchronous message processing mechanism List-watch is a unified message transmission mode in the k8s system, plays a key role in system performance and data consistency, etcd stores data information of a cluster, and an apiserver is used as a unified entry, so that any operation on data must go through the apiserver. The method comprises the steps that a client (kubelet/scheduler/Controller-manager) monitors events of a resource (pod/rs/rc and the like) in an APIServer through a List-watch, and calls corresponding event processing functions according to event types; the first Controller may also be configured to obtain services on a unified asynchronous message handling mechanism List-watch, and update the server interface APIServer, thereby generating an extension interface for the distributed registration service center ETCD, that is, a secondary development capability extension interface CRD REST of the custom resource.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a first controller provided in an embodiment of the present invention, where the first controller may include a Resource management module Resource Manager and a Control Loop module Control Loop, where the Resource management module Resource Manager performs data interaction with an interface service Kubernetes API Server based on List & Watch, the first controller may be configured to parse a definition of a CRD, create a corresponding interface, monitor that a modification occurs on a Resource definition by a cluster, verify content, and add the definition conforming to an orchestration system rule to be received by api and written into a distributed registration service center etcd, where the first controller of the system adds the definition, and may perform Resource Control.
By the mode, the resource binding can be completed only by adding the storage resource in the declaration; the multi-scenario mode can support flexible configuration, can open access interfaces for users outside the cluster according to needs, meanwhile, users can acquire service resources by only defining CRD interfaces to declare the service resources, complexity of developing NFS services is reduced, maintenance cost of the NFS services is reduced, users do not need to care about NFS service storage bottom storage logic, users only need to care about keyword operator states of the services, and service efficiency of the NFS services is improved.
Example two
Referring to fig. 4, a step flowchart of two resource data processing methods provided in the embodiment of the present invention is shown, which may specifically include the following steps:
step 401, sending the target resource data to the client based on the custom resource definition interface.
The embodiment of the invention can be applied to network file system service end equipment, wherein the network file system service end equipment can be provided with a corresponding client end, the client end is provided with a corresponding network file system service end equipment, and the client end is used for determining definition rules of the container cloud arrangement system and generating a custom resource definition interface aiming at the network file system service end equipment based on the definition rules; determining target resource data through the definition rule; the target resource data has a corresponding target service; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
For the second embodiment, since it is substantially similar to the first embodiment, the description is relatively simple, and the relevant points are only referred to the partial description of the method embodiment.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Example III
Referring to fig. 5, a block diagram of a resource data processing device provided in the third embodiment of the present invention is shown, which may specifically include the following modules:
a definition rule determining module 501, configured to determine a definition rule of the container cloud orchestration system, and generate a custom resource definition interface for the network file system server device based on the definition rule;
a target resource data determining module 502, configured to determine target resource data according to the definition rule; the target resource data has a corresponding target service;
a target resource data obtaining module 503, configured to obtain the target resource data based on the custom resource definition interface, and execute the target service based on the target resource data.
Optionally, the definition rule determining module may include:
an interface version information determining sub-module, configured to determine interface version information of an interface defined for the custom resource, and use the interface version information as a definition rule;
the interface type information determining submodule is used for determining interface type information of the interface defined by the custom resource as definition of the custom resource and taking the interface type information as a definition rule;
a storage metadata information determining sub-module, configured to determine storage metadata information having a first association with the network file system server device, and use the storage metadata information as a definition rule, so that the container cloud orchestration system identifies an association between the custom resource definition interface and the storage metadata based on the storage metadata information;
an interface name information determining sub-module, configured to determine interface name information having a second association with the network file system server device, and use the interface name information as a definition rule, so that the container cloud orchestration system identifies an association between the custom resource definition interface and the network file system server device based on the interface name information;
The interface specification information determining submodule is used for determining interface specification information of the interface defined by the user-defined resource and taking the interface specification information as a definition rule; the interface specification information comprises data scope information for the storage metadata, and the data scope information is used for determining the data scope of the storage metadata with an association relation with the custom resource definition interface.
Optionally, the method may further include:
and the data type information determining sub-module is used for determining the data type information of the returned data of the network file system server-side equipment and taking the data type information as a definition rule.
Optionally, the cloud orchestration system includes a first controller, and may further include:
and the definition rule description sub-module is used for describing the definition rule to the first controller.
Optionally, the cloud orchestration system is configured to generate persistent storage claim information, and may further include:
and the claim category information determining sub-module is used for determining claim category information aiming at the persistent storage claim information and taking the claim category information as a definition rule.
Optionally, the method may further include:
And the database field determining submodule is used for determining a database field of a daemon of the custom resource definition interface and taking the database field as a definition rule so that the definition resource definition interface is restarted when the database field is read.
Optionally, the target resource data determining module may include:
the association relation determining sub-module is used for determining the association relation between the custom resource definition interface and the network file system server equipment based on the interface version information, the interface category information and the interface name information;
and the target resource data determining sub-module is used for determining the target resource data through the data range information.
Optionally, the method may further include:
and the persistent volume declaration submodule is used for making a persistent volume declaration aiming at the custom resource definition interface to the network file system server equipment based on the declaration category information.
Optionally, the method may further include:
the new service acquisition sub-module is used for acquiring the new service and determining a new definition rule corresponding to the new service;
the newly-added definition rule determining submodule is used for analyzing the newly-added definition rule by adopting the first controller and generating a newly-added custom resource definition interface aiming at the newly-added definition rule when the newly-added definition rule is monitored;
The newly-added target resource data acquisition sub-module is used for acquiring newly-added target resource data corresponding to the newly-added custom resource definition interface based on the newly-added custom resource definition interface and executing the newly-added target service based on the newly-added target resource data; the newly added custom resource definition interface has a corresponding authority account number.
Optionally, the custom resource definition may have a corresponding distributed key value pair storage system, and further includes:
and the newly-added definition rule writing sub-module is used for writing the newly-added definition rule into the distributed key value pair storage system by adopting the newly-added custom resource definition interface.
Optionally, the method may further include:
and the second controller creating sub-module is used for creating a second controller aiming at the container cloud arrangement system, and scanning storage nodes of the network file system server-side equipment through the second controller so as to determine available disks from the network file system server-side equipment.
Optionally, the method may further include:
a storage pool creation sub-module for creating a storage pool using the available disk;
and the data copy creation sub-module is used for creating a data copy aiming at the target resource data and storing the data copy in the storage pool.
Example IV
Referring to fig. 6, a block diagram of a resource data processing device provided in a fourth embodiment of the present invention is shown, and may specifically include the following modules:
a target resource data sending module 601, configured to send the target resource data to the client based on the custom resource definition interface; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
For the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points.
In addition, the embodiment of the invention also provides electronic equipment, which comprises: the processor, the memory, store the computer program on the memory and can run on the processor, this computer program realizes each process of the above-mentioned resource data processing method embodiment when being carried out by the processor, and can reach the same technical result, in order to avoid repetition, will not be repeated here.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, realizes the processes of the above-mentioned resource data processing method embodiment, and can achieve the same technical effects, and in order to avoid repetition, the description is omitted here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device implementing various embodiments of the present invention.
The electronic device 700 includes, but is not limited to: radio frequency unit 701, network module 702, audio output unit 703, input unit 704, sensor 705, display unit 706, user input unit 707, interface unit 708, memory 709, processor 710, and power supply 711. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 7 is not limiting of the electronic device and that the electronic device may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiment of the invention, the electronic equipment comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 701 may be used for receiving and transmitting signals during the process of receiving and transmitting information or communication, specifically, receiving downlink data from a base station, and then processing the received downlink data by the processor 710; and, the uplink data is transmitted to the base station. Typically, the radio unit 701 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio unit 701 may also communicate with networks and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 702, such as helping the user to send and receive e-mail, browse web pages, and access streaming media, etc.
The audio output unit 703 may convert audio data received by the radio frequency unit 701 or the network module 702 or stored in the memory 709 into an audio signal and output as sound. Also, the audio output unit 703 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the electronic device 700. The audio output unit 703 includes a speaker, a buzzer, a receiver, and the like.
The input unit 704 is used for receiving an audio or video signal. The input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, the graphics processor 7041 processing image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 706. The image frames processed by the graphics processor 7041 may be stored in memory 709 (or other storage medium) or transmitted via the radio unit 701 or the network module 702. The microphone 7042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 701 in the case of a telephone call mode.
The electronic device 700 also includes at least one sensor 705, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 7061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 7061 and/or the backlight when the electronic device 700 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the electronic equipment (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 705 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., and will not be described again here.
The display unit 706 is used to display information input by a user or information provided to the user. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 707 is operable to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 7071 or thereabout using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 7071 may include two parts, a touch detection device and a touch first controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch first controller; the touch first controller receives touch information from the touch detecting means, converts it into touch point coordinates, and then transmits the touch point coordinates to the processor 710, receives a command transmitted from the processor 710, and performs the operation. In addition, the touch panel 7071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 707 may include other input devices 7072 in addition to the touch panel 7071. In particular, other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
Further, the touch panel 7071 may be overlaid on the display panel 7061, and when the touch panel 7071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 710 to determine a type of a touch event, and then the processor 710 provides a corresponding visual output on the display panel 7061 according to the type of the touch event. Although in fig. 7, the touch panel 7071 and the display panel 7061 are two independent components for implementing the input and output functions of the electronic device, in some embodiments, the touch panel 7071 and the display panel 7061 may be integrated to implement the input and output functions of the electronic device, which is not limited herein.
The interface unit 708 is an interface to which an external device is connected to the electronic apparatus 700. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 708 may be used to receive input (e.g., data information, power, etc.) from an external device and to transmit the received input to one or more elements within the electronic apparatus 700 or may be used to transmit data between the electronic apparatus 700 and an external device.
The memory 709 may be used to store software programs as well as various data. The memory 709 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 709 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 710 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 709 and calling data stored in the memory 709, thereby performing overall monitoring of the electronic device. Processor 710 may include one or more processing units; preferably, the processor 710 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 710.
The electronic device 700 may also include a power supply 711 (e.g., a battery) for powering the various components, and the power supply 711 may preferably be logically coupled to the processor 710 via a power management system, such as to perform functions such as managing charge, discharge, and power consumption by the power management system.
In addition, the electronic device 700 includes some functional modules, which are not shown, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.
Claims (15)
1. A method for processing resource data, wherein the method is applied to a client, the client is configured with a corresponding container cloud orchestration system, the client has a corresponding network file system server device, and the method comprises:
determining definition rules of the container cloud orchestration system, and generating a custom resource definition interface for the network file system server device based on the definition rules;
determining target resource data through the definition rule; the target resource data has a corresponding target service;
and acquiring the target resource data based on the custom resource definition interface, and executing the target service based on the target resource data.
2. The method of claim 1, wherein the step of determining definition rules for the container cloud orchestration system comprises:
interface version information of the interface defined by the user-defined resource is determined, and the interface version information is used as a definition rule;
determining interface class information of the interface defined by the custom resource as custom resource definition, and taking the interface class information as definition rules;
determining storage metadata information with a first association relation with the network file system server-side equipment, and taking the storage metadata information as a definition rule, so that the container cloud arrangement system identifies the association relation between the custom resource definition interface and the storage metadata based on the storage metadata information;
Determining interface name information with a second association relation with the network file system server-side equipment, and taking the interface name information as a definition rule, so that the container cloud orchestration system identifies the association relation between the custom resource definition interface and the network file system server-side equipment based on the interface name information;
interface specification information of the interface defined by the user-defined resource is determined, and the interface specification information is used as a definition rule; the interface specification information comprises data scope information for the storage metadata, and the data scope information is used for determining the data scope of the storage metadata with an association relation with the custom resource definition interface.
3. The method as recited in claim 2, further comprising:
determining data category information of returned data of the network file system server-side equipment, and taking the data category information as a definition rule; the cloud orchestration system comprises a first controller;
describing the definition rule to the first controller; the cloud orchestration system is used for generating persistent storage claim information;
and determining the claim category information of the claim information stored for the persistence, and taking the claim category information as a definition rule.
4. A method according to claim 3, further comprising:
determining a database field of a daemon for the custom resource definition interface, and taking the database field as a definition rule, so that when the database field is read, the definition resource definition interface is restarted.
5. The method of claim 4, wherein the step of determining target resource data by the definition rule comprises:
determining an association relationship between the custom resource definition interface and the network file system server equipment based on the interface version information, the interface category information and the interface name information;
and determining target resource data through the data range information.
6. The method as recited in claim 5, further comprising:
and making a persistent volume declaration for the custom resource definition interface to the network file system server device based on the declaration category information.
7. The method as recited in claim 6, further comprising:
acquiring a new service, and determining a new definition rule corresponding to the new service;
when the newly added definition rule is monitored, analyzing the newly added definition rule by adopting the first controller, and generating a newly added custom resource definition interface aiming at the newly added definition rule;
Acquiring newly-added target resource data corresponding to the newly-added custom resource definition interface based on the newly-added custom resource definition interface, and executing the newly-added service based on the newly-added target resource data; the newly added custom resource definition interface has a corresponding authority account number.
8. The method of claim 7, wherein the custom resource definition has a corresponding distributed key-value pair storage system, further comprising:
and writing the newly-added definition rule into the distributed key value pair storage system by adopting the newly-added definition resource definition interface.
9. The method as recited in claim 6, further comprising:
creating a second controller for the container cloud orchestration system, and scanning storage nodes of the network file system server-side equipment through the second controller to determine available disks from the network file system server-side equipment.
10. The method as recited in claim 9, further comprising:
creating a storage pool by using the available disk;
creating a data copy for the target resource data and storing the data copy in the storage pool.
11. The method is applied to network file system service end equipment, wherein the network file system service end equipment is provided with a corresponding client, the client is configured with a corresponding container cloud arrangement system, the client is used for determining definition rules of the container cloud arrangement system, and a custom resource definition interface for the network file system service end equipment is generated based on the definition rules; determining target resource data through the definition rule; the target resource data has a corresponding target service, including:
transmitting the target resource data to the client based on the custom resource definition interface; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
12. A resource data processing apparatus, the apparatus being applied to a client configured with a corresponding container cloud orchestration system, the client having a corresponding network file system server device, comprising:
the definition rule determining module is used for determining definition rules of the container cloud orchestration system and generating a custom resource definition interface for the network file system server device based on the definition rules;
The target resource data determining module is used for determining target resource data through the definition rule; the target resource data has a corresponding target service;
and the target resource data acquisition module is used for acquiring the target resource data based on the custom resource definition interface and executing the target service based on the target resource data.
13. A resource data processing device, wherein the device is applied to a network file system server device, the network file system server device is provided with a corresponding client, the client is configured with a corresponding container cloud arrangement system, the client is used for determining definition rules of the container cloud arrangement system, and a custom resource definition interface for the network file system server device is generated based on the definition rules; determining target resource data through the definition rule; the target resource data has a corresponding target service, including:
the target resource data sending module is used for sending the target resource data to the client based on the user-defined resource definition interface; the client is used for acquiring the target resource data based on the user-defined resource definition interface and executing the target service based on the target resource data.
14. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor being configured to implement the method of any one of claims 1-11 or 12 when executing a program stored on a memory.
15. A computer-readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-11 or 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310270591.3A CN116450598A (en) | 2023-03-16 | 2023-03-16 | Resource data processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310270591.3A CN116450598A (en) | 2023-03-16 | 2023-03-16 | Resource data processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116450598A true CN116450598A (en) | 2023-07-18 |
Family
ID=87122941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310270591.3A Pending CN116450598A (en) | 2023-03-16 | 2023-03-16 | Resource data processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116450598A (en) |
-
2023
- 2023-03-16 CN CN202310270591.3A patent/CN116450598A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111416845B (en) | Method, device and storage medium for configuring edge equipment | |
JP2004303248A (en) | Architecture and system for location awareness | |
CN112084747B (en) | Resource management method and device, electronic equipment and storage medium | |
CN110032512A (en) | A kind of adjustment method of small routine, relevant device and terminal | |
CN112262556B (en) | Model file management method and terminal equipment | |
CN114244595A (en) | Method and device for acquiring authority information, computer equipment and storage medium | |
CN114694226B (en) | Face recognition method, system and storage medium | |
CN113742366A (en) | Data processing method and device, computer equipment and storage medium | |
CN111399819A (en) | Data generation method and device, electronic equipment and storage medium | |
CN111752688B (en) | Data acquisition method and device, electronic equipment and storage medium | |
CN110825465B (en) | Log data processing method and device, electronic equipment and storage medium | |
CN110489657B (en) | Information filtering method and device, terminal equipment and storage medium | |
CN115061939B (en) | Data set security test method, device and storage medium | |
CN115640567B (en) | TEE integrity authentication method, device, system and storage medium | |
CN116610508A (en) | Heat dissipation test method and device, electronic equipment and storage medium | |
CN115984643A (en) | Model training method, related device and storage medium | |
CN115589432A (en) | Message push management method, device, medium and equipment | |
CN113890753B (en) | Digital identity management method, device, system, computer equipment and storage medium | |
CN116450598A (en) | Resource data processing method and device, electronic equipment and storage medium | |
CN111475141A (en) | List generation method and device and electronic equipment | |
CN112732548A (en) | Interface testing method and device | |
CN116069693A (en) | Method and device for batch processing of commands, electronic equipment and storage medium | |
CN110691095B (en) | Data processing method, device and equipment based on data security room and storage medium | |
CN117149619A (en) | Automatic testing method and device for files, electronic equipment and storage medium | |
CN116627899A (en) | Data export method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100007 room 205-32, floor 2, building 2, No. 1 and No. 3, qinglonghutong a, Dongcheng District, Beijing Applicant after: Tianyiyun Technology Co.,Ltd. Address before: 100093 Floor 4, Block E, Xishan Yingfu Business Center, Haidian District, Beijing Applicant before: Tianyiyun Technology Co.,Ltd. |