AUTOMATED CREATION OF CUSTOM CONTROLLERS FOR CONTAINERS
The disclosure provides a method for automatically creating a custom controller for a container-based cluster. The method includes receiving input identifying one or more objects to include as part of a custom resource, the custom resource being an object deployable in a container-based cluster. The method further includes receiving, for each of the one or more objects, a configuration of corresponding one or more parameters of the object. The method further includes generating, based on the input and the configuration, a specification of a custom controller configured to manage the custom resource. The method further includes generating, based on the input and the configuration, a specification for the custom resource. The method further includes deploying the custom controller and the custom resource in a first container-based cluster using the specification of the custom controller and the specification of the custom resource.
1 . A method for automatically creating a custom controller for a container-based cluster, comprising:
receiving input identifying one or more objects to include as part of a custom resource, the custom resource being an object deployable in a container-based cluster;
receiving, for each of the one or more objects, a configuration of corresponding one or more parameters of the object;
generating, based on the input and the configuration, a specification of a custom controller configured to manage the custom resource;
generating, based on the input and the configuration, a specification for the custom resource; and
deploying the custom controller and the custom resource in a first container-based cluster using the specification of the custom controller and the specification of the custom resource.
2 . The method of claim 1 , wherein the specification of the custom controller is a first YAML file and the specification of the custom resource is a second YAML file, and wherein the first YAML file includes a custom resource definition corresponding to the custom resource.
3 . The method of claim 1 , wherein generating the specification of the custom controller is further based on an custom controller template comprising one or more fields, wherein each of the one or more fields maps to at least one of the identified one or more objects or at least one of the one or more parameters.
4 . The method of claim 1 , wherein deploying the custom controller and the custom resource comprises applying the specification of the custom controller and the specification of the custom resource to the first container-based cluster via an API server of the first container-based cluster.
5 . The method of claim 1 , wherein the one or more objects include one or more of a deployment, a service, or a secret.
6 . The method of claim 1 , wherein the specification of the custom controller specifies a container image for the custom controller, and wherein deploying the custom controller comprises instantiating the custom controller from the image of the custom controller.
7 . The method of claim 1 , further comprising managing a plurality of custom controllers.
8 . A system comprising:
one or more processors; and
at least one memory, the one or more processors and the at least one memory configured to:
receive input identifying one or more objects to include as part of a custom resource, the custom resource being an object deployable in a container-based cluster;
receive, for each of the one or more objects, a configuration of corresponding one or more parameters of the object;
generate, based on the input and the configuration, a specification of a custom controller configured to manage the custom resource;
generate, based on the input and the configuration, a specification for the custom resource; and
deploy the custom controller and the custom resource in a first container-based cluster using the specification of the custom controller and the specification of the custom resource.
9 . The system of claim 8 , wherein the specification of the custom controller is a first YAML file and the specification of the custom resource is a second YAML file, and wherein the first YAML file includes a custom resource definition corresponding to the custom resource.
10 . The system of claim 8 , wherein generating the specification of the custom controller is further based on an custom controller template comprising one or more fields, wherein each of the one or more fields maps to at least one of the identified one or more objects or at least one of the one or more parameters.
11 . The system of claim 8 , wherein deploying the custom controller and the custom resource comprises applying the specification of the custom controller and the specification of the custom resource to the first container-based cluster via an API server of the first container-based cluster.
12 . The system of claim 8 , wherein the one or more objects include one or more of a deployment, a service, or a secret.
13 . The system of claim 8 , wherein the specification of the custom controller specifies a container image for the custom controller, and wherein deploying the custom controller comprises instantiating the custom controller from the image of the custom controller.
14 . The system of claim 8 , wherein the one or more processors and the at least one memory are further configured to manage a plurality of custom controllers.
15 . One or more non-transitory computer-readable media comprising instructions that, when executed by one or more processors of a computing system, cause the computing system to perform operations for deploying a product having a plurality of microservices in a container-based cluster, the operations comprising:
receiving input identifying one or more objects to include as part of a custom resource, the custom resource being an object deployable in a container-based cluster;
receiving, for each of the one or more objects, a configuration of corresponding one or more parameters of the object;
generating, based on the input and the configuration, a specification of a custom controller configured to manage the custom resource;
generating, based on the input and the configuration, a specification for the custom resource; and
deploying the custom controller and the custom resource in a first container-based cluster using the specification of the custom controller and the specification of the custom resource.
16 . The one or more non-transitory computer-readable media of claim 15 , wherein the specification of the custom controller is a first YAML file and the specification of the custom resource is a second YAML file, and wherein the first YAML file includes a custom resource definition corresponding to the custom resource.
17 . The one or more non-transitory computer-readable media of claim 15 , wherein generating the specification of the custom controller is further based on an custom controller template comprising one or more fields, wherein each of the one or more fields maps to at least one of the identified one or more objects or at least one of the one or more parameters.
18 . The one or more non-transitory computer-readable media of claim 15 , wherein deploying the custom controller and the custom resource comprises applying the specification of the custom controller and the specification of the custom resource to the first container-based cluster via an API server of the first container-based cluster.
19 . The one or more non-transitory computer-readable media of claim 15 , wherein the one or more objects include one or more of a deployment, a service, or a secret.
20 . The one or more non-transitory computer-readable media of claim 15 , wherein the specification of the custom controller specifies a container image for the custom controller, and wherein deploying the custom controller comprises instantiating the custom controller from the image of the custom controller.