{"id":16802996,"url":"https://github.com/ishankhare07/image-cloner","last_synced_at":"2026-04-28T00:31:21.458Z","repository":{"id":81355813,"uuid":"349412037","full_name":"ishankhare07/image-cloner","owner":"ishankhare07","description":"A k8s controller which watches the applications and caches the images by re-uploading to our own registry and re-configures the applications to use these copies. It currently applies to only Deployments and Daemonsets","archived":false,"fork":false,"pushed_at":"2021-03-23T11:16:47.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-25T07:50:40.449Z","etag":null,"topics":["kubernetes","kubernetes-container-images","kubernetes-controller"],"latest_commit_sha":null,"homepage":"","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/ishankhare07.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":"2021-03-19T12:15:15.000Z","updated_at":"2021-07-31T10:19:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"90367b68-6b59-4e1a-a46f-e5b7744612f8","html_url":"https://github.com/ishankhare07/image-cloner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ishankhare07/image-cloner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishankhare07%2Fimage-cloner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishankhare07%2Fimage-cloner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishankhare07%2Fimage-cloner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishankhare07%2Fimage-cloner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishankhare07","download_url":"https://codeload.github.com/ishankhare07/image-cloner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishankhare07%2Fimage-cloner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["kubernetes","kubernetes-container-images","kubernetes-controller"],"created_at":"2024-10-13T09:41:15.066Z","updated_at":"2026-04-28T00:31:21.442Z","avatar_url":"https://github.com/ishankhare07.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# image-cloner\nA k8s controller which watches the applications and caches the images by re-uploading to our own registry and re-configures the applications to use these copies.\n[![asciicast](https://asciinema.org/a/401567.svg)](https://asciinema.org/a/401567)\n\n### Prerequisits\n1. A cluster is required, it can be a managed cluster like GKE etc. or a local `kind` or `minikube` cluster.  \n  The makefile contains the way to create the `kind` cluster with the following command.\n  If you don't have `kind` installed:\n  ```shell\n  $ make install-kind\n  ```\n  ```shell\n  $ make cluster\n  ```\n2. The operator need a secret which holds the registry creds to the private docker registry where all the image will be cached.  \nThis has to be created upfront before deploying the operator to your cluster. Below are the steps\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: private-registry-creds\n  namespace: system\ntype: Opaque\nstringData:\n  DOCKER_REGISTRY_URI: \u003cregistry_name/repo_name\u003e  # example \"index.docker.io/ishankhare07\"\n  DOCKER_REGISTRY_USERNAME: \u003cusername\u003e\n  DOCKER_REGISTRY_PASSWORD: \u003cpassword\u003e\n```\n  And then create this secret in the cluster:\n```shell\n$ kubectl apply -f secret.yaml\n```\n\n### Use your registry to host operator\nThe controller image is currently available as a public image on dockerhub at `ishankhare07/image-cloner`, in case you want to host your own image  \nbuild and push to your registry in the following way:\n```shell\n$ docker login \u003cyour_registry\u003e\n...\n...\n...\n\n$ IMG=\"\u003cyour_registry/username\u003e\" make build\n$ IMG=\"\u003cyour_registry/username\u003e\" make push\n$ IMG=\"\u003cyour_registry/username\u003e\" make deploy\n```\n\n### Use existing registry image\nIf you are okay with using the current image on the public dockerhub, just go ahead and deploy:\n```shell\n$ make deploy\n```\n\nThis will apply the following to your cluster:\n1. Create namespace `system`\n2. Create `clusterrole` for the controllers\n3. Create `clusterrolebindings`\n4. Create `deployment` which will actually run the controller.\n\n### Running locally\nWhen running locally, create a file called `config/config.env` which contains the private registry cred as follows:\n```\nDOCKER_REGISTRY_URI=\"\u003cregistry_name/repo_name\u003e\"\nDOCKER_REGISTRY_USERNAME=\"\u003cusername\u003e\"\nDOCKER_REGISTRY_PASSWORD=\"\u003cpassword\u003e\"\n```\n\nThis allows easily testing the whole flow, next just run:\n```shell\n$ make cluster\n$ make run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishankhare07%2Fimage-cloner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishankhare07%2Fimage-cloner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishankhare07%2Fimage-cloner/lists"}