{"id":16878882,"url":"https://github.com/peterj/ec-kube","last_synced_at":"2025-10-11T21:32:36.048Z","repository":{"id":219512864,"uuid":"749216441","full_name":"peterj/ec-kube","owner":"peterj","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-04T00:37:07.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-19T21:43:09.790Z","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/peterj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-27T22:48:38.000Z","updated_at":"2024-01-28T00:48:27.000Z","dependencies_parsed_at":"2025-03-19T21:39:56.333Z","dependency_job_id":"d57b8380-75ea-4261-9c94-dc4b39e0f1c9","html_url":"https://github.com/peterj/ec-kube","commit_stats":null,"previous_names":["peterj/ec-kube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/peterj/ec-kube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fec-kube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fec-kube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fec-kube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fec-kube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterj","download_url":"https://codeload.github.com/peterj/ec-kube/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterj%2Fec-kube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008860,"owners_count":26084518,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-13T15:51:56.703Z","updated_at":"2025-10-11T21:32:36.003Z","avatar_url":"https://github.com/peterj.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ec-kube\n\nAs part of my weekend AI streams, I am building a Kubernetes controller that will manage Embedchain AI apps.\n\nStreams:\n\n- Part 1: [Watch here](https://www.youtube.com/watch?v=X-irXixeo1Y)\n- Part 2: [Join here](https://www.youtube.com/watch?v=q2sG9cRJh-w)\n\n## What are we building?\n\n1. Create the Kubernetes controller (I'll use the kubebuilder)\n\n```yaml\nspec:\n  secretRef:\n    name: this-is-my-secret\n\n  config: |-\n    {\n      // Embedchain config\n    }\n```\n\n2. Embedchain API Docker image\n\n## Running the image in Kubernetes\n\nCreate a ConfigMap that holds the Embedchain config file:\n\n```sh\nkubectl create configmap ec-config --from-file=ec-image/config/config.yaml\n```\n\nCreate a Secret that holds the `OPENAI_API_KEY` (for now):\n\n```sh\nkubectl create secret generic ec-secret --from-literal='OPENAI_API_KEY=${OPENAI_API_KEY}'\n```\n\n## Kubernetes controller\n\n```shell\nkubebuilder init --domain learncloudnative.com --repo learncloudnative.com/aiapps\nkubebuilder create api --group aiapps --version v1 --kind EmbedchainApp\n\n# Create webhook\nkubebuilder create webhook --group aiapps --version v1 --kind EmbedchainApp --defaulting --programmatic-validation\n```\n\nTo run it locally, make sure you have a K8s cluster running and run:\n\n```shell\nENABLE_WEBHOOKS=false make run\n```\n\n\u003e Setting `ENABLE_WEBHOOKS` to `false`, because the webhook requires a valid certificate.\n\nTry deploying a basic resource:\n\n```yaml\napiVersion: aiapps.learncloudnative.com/v1\nkind: EmbedchainApp\nmetadata:\n  name: myapp\nspec:\n  configRef:\n    name: ec-config\n    namespace: default\n  secretRef:\n    name: ec-secret\n    namespace: default\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fec-kube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterj%2Fec-kube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterj%2Fec-kube/lists"}