{"id":18051713,"url":"https://github.com/apimatic/apimatic-kubernetes-operator","last_synced_at":"2025-04-05T07:13:40.164Z","repository":{"id":47555415,"uuid":"394563260","full_name":"apimatic/apimatic-kubernetes-operator","owner":"apimatic","description":"APIMatic API CodeGen operator for Kubernetes","archived":false,"fork":false,"pushed_at":"2021-08-27T09:47:50.000Z","size":182,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T14:53:16.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apimatic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-10T07:28:22.000Z","updated_at":"2023-08-17T11:17:10.000Z","dependencies_parsed_at":"2022-08-23T19:21:15.767Z","dependency_job_id":null,"html_url":"https://github.com/apimatic/apimatic-kubernetes-operator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fapimatic-kubernetes-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fapimatic-kubernetes-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fapimatic-kubernetes-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apimatic%2Fapimatic-kubernetes-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apimatic","download_url":"https://codeload.github.com/apimatic/apimatic-kubernetes-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299850,"owners_count":20916193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T22:55:11.904Z","updated_at":"2025-04-05T07:13:40.145Z","avatar_url":"https://github.com/apimatic.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Table of contents\n\n* [Introduction](#introduction)\n* [Features](#features)\n* [Running the Sample](#running-the-sample)\n  * [Prerequisites](#prerequisites)\n  * [Steps for Direct Deployment](#steps-for-direct-deployment)\n  * [Steps for OLM Deployment](#steps-for-olm-deployment)\n* [Technical Support](#technical-support)\n* [Copyrights](#copyrights)\n\n## Introduction\n\nAPIMatic Operator simplifies the configuration and lifecycle management of the APIMatic code and docs generation solution on different Kubernetes distributions and OpenShift. The Operator encapsulates key operational knowledge on how to configure and upgrade the APIMatic CodeGen application, making it easy to get up and running.\n\n\nMore information about the underlying APIMatic CodeGen API that is exposed\nby this operator can be found [here](https://apimatic-core-v3-docs.netlify.app/#/http/getting-started/overview-apimatic-core).\n\n## Features\n\nAPIMatic Operator provides the following features:\n- Deploys the APIMatic CodeGen Web API service within the Kubernetes or OpenShift cluster.\n- Exposes the APIMatic CodeGen API external to the cluster, using Service type as [NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#nodeport), [LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) or [ExternalName](https://kubernetes.io/docs/concepts/services-networking/service/#externalname).\n- For exposing the service through an ingress resource, create an Ingress resource in the namespace of your APIMatic CR and set owned APIMatic service created by the operator as a backed service. More information can be found [here](https://kubernetes.io/docs/concepts/services-networking/ingress/).\n- Manual horizontal scaling of pods.\n  ```sh\n  kubectl scale apm apimatic-sample--replicas=2\n  ```\n\n## Running the Sample \n\n### Prerequisites\n\nPlease contact APIMatic at [support@apimatic.io](mailto:support@apimatic.io) to register with the APIMatic CodeGen Docker Hub registry and acquire a valid license to run the APIMatic CodeGen API.\n\nFurther prerequisites for running the sample include:\n\n- [go](https://golang.org/) v1.16.*\n- [git](https://git-scm.com/)\n- [make](https://www.gnu.org/software/make/)\n- [Operator SDK](https://sdk.operatorframework.io/docs/overview/)\n- A running Kubernetes cluster with [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) on client. For testing purposes, you can use [Minikube](https://minikube.sigs.k8s.io/docs/) or [kind](https://kind.sigs.k8s.io/)\n- For checking the service created by the APIMatic operator on-prem, you can use [MetalLB](https://metallb.org/)\n\n### Steps for Direct Deployment\n\nTo run the sample for checking the APIMatic operator:\n\n- Clone the APIMatic repository into your working directory using the following command:\n  ```sh  \n  git clone https://github.com/apimatic/apimatic-kubernetes-operator.git  \n  ```\n- Run `make deploy` to set up the APIMatic operator resources. This will deploy the '`apimatic-system`' namespace as well as the CRD and the RBAC manifests.\n\n- Create a secret named '`apimaticimagesecret`' to allow pulling the APIMatic CodeGen image using the Docker Hub username registered with APIMatic. If you have not done so, please contact support@apimatic.io for the steps required.\n  ```sh\n  kubectl create secret docker-registry apimaticimagesecret --docker-server=https://index.docker.io/v1/ --docker-username=\u003cyour-name\u003e --docker-password=\u003cyour-pword\u003e --docker-email=\u003cyour-email\u003e\n  ```\n- Create a [configmap](https://kubernetes.io/docs/concepts/configuration/configmap/) resource named '`apimaticlicense`' that will serve as the volume storing the APIMatic license. An example of this is given below which will create the ConfigMap using the *License.lic* file located at */usr/local/apimatic/license/*  \n  ```sh  \n  kubectl create configmap apimaticlicense --from-file /usr/local/apimatic/license/License.lic\n  ```\n- This will deploy a ConfigMap resource with the following definition:\n  ```sh\n  apiVersion: v1  \n  data:\n    License.lic: \\\"\u003cLicense file contents here\u003e\\\"  \n  kind: ConfigMap\n  metadata:    \n    name: apimaticlicense    \n    namespace: default  \n  ```\n- Now run the sample using the following command:\n  ```sh  \n  kubectl apply -f config/samples/apicodegen_v1beta1_apimatic.yaml\n  ```\n- You will now see a new [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) with replica count of 3 and [Service](https://kubernetes.io/docs/concepts/services-networking/service/) of type `NodePort` created, both named ***apimatic-sample***. Accessing http://localhost:32000 from your browser (or using curl from within the Minikube or Kind cluster, if using that) should now show the APIMatic Titan page.\n- You can now use the exposed APIMatic CodeGen API to generate API SDKs and Docs using [curl](https://curl.se/), [Postman](https://www.postman.com/) or your own custom Web application that consumes the APIMatic CodeGen API service.\n\n- Once done, you can remove the APIMatic resources using the following command:\n  ```sh\n  make undeploy\n  ```\n\n### Steps for OLM Deployment\n\nThe following steps can be used to utilize [Operator LifeCycle Manager (OLM)](https://olm.operatorframework.io/docs/) to deploy the operator and run the sample. The steps are as follows:\n\n- If not already done so, clone the APIMatic repository into your working directory:\n  ```sh  \n  git clone https://github.com/apimatic/apimatic-kubernetes-operator.git  \n  ``` \n- [Install OLM in your Kubernetes cluster](https://olm.operatorframework.io/docs/getting-started/#installing-olm-in-your-cluster).\n\n- Run the following script to install the resources required by OLM to deploy the APIMatic operator in the Kubernetes cluster within the `apimatic-system` namespace. Information about the different resources required can be found using the steps given [here](https://olm.operatorframework.io/docs/tasks/).\n  ```sh\n  kubectl apply -f olm/manifests.yaml\n  ```\n\n- This should spin up the `ClusterServiceVersion` of the operator in the `apimatic-system` namespace, following which the operator pod will spin up. To ensure the that the operator installed successfully, check for the `ClusterServiceVersion` and the operator deployment in the namespace it was installed in.\n  ```sh\n  kubectl get csv -n apimatic-system\n\n  kubectl get deployment -n apimatic-system\n  ```\n\n- Create a secret named `apimaticimagesecret` to allow pulling the APIMatic CodeGen image using the Docker Hub username registered with APIMatic. If you have not done so, please contact support@apimatic.io for the steps required.\n  ```sh\n  kubectl create secret docker-registry apimaticimagesecret --docker-server=https://index.docker.io/v1/ --docker-username=\u003cyour-name\u003e --docker-password=\u003cyour-pword\u003e --docker-email=\u003cyour-email\u003e\n  ```\n- Create a [configmap](https://kubernetes.io/docs/concepts/configuration/configmap/) resource named `apimaticlicense` that will serve as the volume storing the APIMatic license. An example of this is given below which will create the ConfigMap using the *License.lic* file located at */usr/local/apimatic/license/*  \n  ```sh  \n  kubectl create configmap apimaticlicense --from-file /usr/local/apimatic/license/License.lic\n  ```\n- This will deploy a ConfigMap resource with the following definition:\n  ```sh\n  apiVersion: v1  \n  data:\n    License.lic: \\\"\u003cLicense file contents here\u003e\\\"  \n  kind: ConfigMap\n  metadata:    \n    name: apimaticlicense    \n    namespace: default  \n  ```\n- Now run the sample using the following command:\n  ```sh  \n  kubectl apply -f config/samples/apicodegen_v1beta1_apimatic.yaml\n  ```\n- You will now see a new [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) with replica count of 3 and [Service](https://kubernetes.io/docs/concepts/services-networking/service/) of type `NodePort` created, both named ***apimatic-sample***. Accessing http://localhost:32000 from your browser (or using curl from within the Minikube or Kind cluster, if using that) should now show the APIMatic Titan page.\n- You can now use the exposed APIMatic CodeGen API to generate API SDKs and Docs using [curl](https://curl.se/), [Postman](https://www.postman.com/) or your own custom Web application that consumes the APIMatic CodeGen API service.\n- Once done, you can remove the APIMatic operator resources using the follow script:\n  ```sh\n  kubectl delete -f olm/manifests.yaml\n  ```\n\n## Technical Support\n\n- To request additional features in the future, or if you notice any discrepancy regarding this document, please drop an email to [support@apimatic.io](mailto:support@apimatic.io).\n\n### Copyrights\n\n\u0026copy; 2021 APIMatic.io","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimatic%2Fapimatic-kubernetes-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapimatic%2Fapimatic-kubernetes-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapimatic%2Fapimatic-kubernetes-operator/lists"}