{"id":36911832,"url":"https://github.com/lucheng0127/virteip-operator","last_synced_at":"2026-01-12T15:59:28.055Z","repository":{"id":228729760,"uuid":"774680417","full_name":"lucheng0127/virteip-operator","owner":"lucheng0127","description":"An extension for kubevirt provide access to kubevirt vmi through elastic ip","archived":false,"fork":false,"pushed_at":"2024-03-22T07:19:59.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T17:57:55.706Z","etag":null,"topics":["eip","kube-eip","kubevirt"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucheng0127.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}},"created_at":"2024-03-20T01:19:42.000Z","updated_at":"2024-03-21T02:11:48.000Z","dependencies_parsed_at":"2024-03-20T07:43:20.593Z","dependency_job_id":null,"html_url":"https://github.com/lucheng0127/virteip-operator","commit_stats":null,"previous_names":["lucheng0127/virteip-operator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lucheng0127/virteip-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucheng0127%2Fvirteip-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucheng0127%2Fvirteip-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucheng0127%2Fvirteip-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucheng0127%2Fvirteip-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucheng0127","download_url":"https://codeload.github.com/lucheng0127/virteip-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucheng0127%2Fvirteip-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28341897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T15:50:39.657Z","status":"ssl_error","status_checked_at":"2026-01-12T15:49:49.297Z","response_time":98,"last_error":"SSL_read: 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":["eip","kube-eip","kubevirt"],"created_at":"2026-01-12T15:59:26.802Z","updated_at":"2026-01-12T15:59:28.044Z","avatar_url":"https://github.com/lucheng0127.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# virteip-operator\n**virteip-operator** is an extension for kubevirt, aim to provide an access to kubevirt vmi through elastic ip.\n\nUser create an eipbinding CRD, and operator will create a job to call [kube-eip](https://github.com/lucheng0127/kube-eip) provide an elastic ip access to kubevirt vmi.\n\n## How it work\n\nAn EipBinding CR repersent an elastic ip bind to a kubevirt virtual machine instance ip(Implement by kube-eip).\n\n**Lifecyle of eip**\n\n1. create eipbinding crd\n2. virteip-operator watch eipbinding and vmi\n3. create a job use eipctl image\n4. job call kube-eip agent to apply eipbinding rules\n5. vmi stop, start or migare\n6. operator get the new vmi ip and hyper info\n7. create a job clean staled eipbinding rules\n8. create a job apply new eipbinding rules\n9. delete eipbinding crd\n10. create a job clean up eipbinding rules\n11. delete jobs and pods created by crd controller\n\nThe crd controller will auto delete staled jobs.\n_ the default job history limit is 3, it means one crd will keep no more than 5 jobs hisotry, you can set it in crd spec.jobHistory_\n\n## Description\nThe operator watch the EipBinding and kubevirt VMI resources, if EipBinding or kubevirt VMI info change, compare it if need change create a job to call kube-eip agent to clean up or apply a new eip binding rules to target hyper. And the eip binding rules will make kubevirt vmi accessable by elastic ip defined in EipBinding.\n\nEipBinding Example\n```\napiVersion: virteip.github.com/v1\nkind: EipBinding\nmetadata:\n  labels:\n    app.kubernetes.io/name: eipbinding\n    app.kubernetes.io/instance: eipbinding-sample\n    app.kubernetes.io/part-of: virteip-operator\n    app.kubernetes.io/managed-by: kustomize\n    app.kubernetes.io/created-by: virteip-operator\n  name: eipbinding-sample\nspec:\n  vmi: cirros\n  eip: 192.168.137.50\n```\n* vmi: instance name of kubevirt virtual machine\n* eip: elastic ipv4 address\n\n## Getting Started\n\n### Prerequisites\n- nerdctl version 2.0.0-beta.2+.\n- Access to a Kubernetes cluster.\n\n### To Deploy on the cluster\n**Current tested IMG**:\n\n* quay.io/shawnlu0127/virteip-operator:20240322-fixcleanup\n* quay.io/shawnlu0127/eipctl:20240319 (job pod image)\n\n_The eipctl images x86 only right now, for arm64 check the readme of [kube-eip](https://github.com/lucheng0127/kube-eip) to build arm64 image_\n\nChange the image in code and rebuild the operator image\n```\n# virteip-operator/internal/controller/eipbinding_controller.go line 44\n```\n**Build and push your image to the location specified by `IMG`:**\n\n```sh\nmake docker-build docker-push IMG=\u003csome-registry\u003e/virteip-operator:tag\n```\n\n**NOTE:** This image ought to be published in the personal registry you specified. \nAnd it is required to have access to pull the image from the working environment. \nMake sure you have the proper permission to the registry if the above commands don’t work.\n\n**Install the CRDs into the cluster:**\n\n```sh\nmake install\n```\n\n**Deploy the Manager to the cluster with the image specified by `IMG`:**\n\n```sh\nmake deploy IMG=\u003csome-registry\u003e/virteip-operator:tag\n```\n\n\u003e **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin \nprivileges or be logged in as admin.\n\n**Create instances of your solution**\nYou can apply the samples (examples) from the config/sample:\n\n```sh\nkubectl apply -k config/samples/\n```\n\n\u003e**NOTE**: Ensure that the samples has default values to test it out.\n\n### To Uninstall\n**Delete the instances (CRs) from the cluster:**\n\n```sh\nkubectl delete -k config/samples/\n```\n\n**Delete the APIs(CRDs) from the cluster:**\n\n```sh\nmake uninstall\n```\n\n**UnDeploy the controller from the cluster:**\n\n```sh\nmake undeploy\n```\n\n## Project Distribution\n\nFollowing are the steps to build the installer and distribute this project to users.\n\n1. Build the installer for the image built and published in the registry:\n\n```sh\nmake build-installer IMG=\u003csome-registry\u003e/virteip-operator:tag\n```\n\nNOTE: The makefile target mentioned above generates an 'install.yaml'\nfile in the dist directory. This file contains all the resources built\nwith Kustomize, which are necessary to install this project without\nits dependencies.\n\n2. Using the installer\n\nUsers can just run kubectl apply -f \u003cURL for YAML BUNDLE\u003e to install the project, i.e.:\n\n```sh\nkubectl apply -f https://raw.githubusercontent.com/\u003corg\u003e/virteip-operator/\u003ctag or branch\u003e/dist/install.yaml\n```\n\n## Contributing\n// TODO(user): Add detailed information on how you would like others to contribute to this project\n\n**NOTE:** Run `make help` for more information on all potential `make` targets\n\nMore information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)\n\n## License\n\nCopyright 2024.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucheng0127%2Fvirteip-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucheng0127%2Fvirteip-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucheng0127%2Fvirteip-operator/lists"}