{"id":23623591,"url":"https://github.com/freedisch/k8s-operator","last_synced_at":"2026-07-21T03:34:20.062Z","repository":{"id":222017345,"uuid":"755327653","full_name":"Freedisch/k8s-operator","owner":"Freedisch","description":"Custom k8s Operator that create a deployment, a service, and an ingress resource to expose it on a desired port when an Expose resource is created by an administrator.","archived":false,"fork":false,"pushed_at":"2024-03-24T17:15:49.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-28T02:42:24.925Z","etag":null,"topics":[],"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/Freedisch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-09T22:30:51.000Z","updated_at":"2024-04-30T18:08:20.000Z","dependencies_parsed_at":"2024-03-24T18:27:39.022Z","dependency_job_id":"2bbbe1ce-da3e-49ee-889e-a10165ed7fe0","html_url":"https://github.com/Freedisch/k8s-operator","commit_stats":null,"previous_names":["freedisch/k8s-operator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Freedisch/k8s-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freedisch%2Fk8s-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freedisch%2Fk8s-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freedisch%2Fk8s-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freedisch%2Fk8s-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freedisch","download_url":"https://codeload.github.com/Freedisch/k8s-operator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freedisch%2Fk8s-operator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014651,"owners_count":26085555,"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-13T02:00:06.723Z","response_time":61,"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-12-27T20:49:42.617Z","updated_at":"2025-10-13T10:37:53.024Z","avatar_url":"https://github.com/Freedisch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-operator\n\nThe operator will create a deployment, a service, and an ingress resource to expose it on a desired port when an **Expose** resource is created by an administrator.\n\n## Description\n\nThe operator’s job is to create a deployment, a service, and an ingress resource to expose it on a desired port when a custom resource is created by an administrator. The idea is to build a controller to create a service and ingress resources when a deployment resource is created without using CRD's. Also this operator is bootstrapped with Kubebuilder.\n\n## Getting Started\n\n### Prerequisites\n\n- go version v1.20.0+\n- docker version 17.03+.\n- kubectl version v1.11.3+.\n- Access to a Kubernetes v1.11.3+ cluster.\n\n### 'Expose' Custom Resource\n\n```\napiVersion: api.core.k8s-operator.io/v1alpha1\nkind: Expose\nmetadata:\n  labels:\n    app.kubernetes.io/name: expose\n    app.kubernetes.io/instance: expose-sample\n    app.kubernetes.io/part-of: k8s-operator\n    app.kubernetes.io/managed-by: kustomize\n    app.kubernetes.io/created-by: k8s-operator\n  name: expose-sample\nspec:\n  name: cr-dsi\n  deployment:\n    - name: nginx-deployment\n      replicas: 1\n      component: nginx\n      containers:\n        - name: nginx\n          image: nginx\n  service:\n    - name: nginx-service\n      port: 80\n  ingress:\n    - name: nginx-ingress\n      path: /nginx\n\n```\n\n### To Deploy on the cluster\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/k8s-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=freedisch/k8s-operator:1.0.0-alpha\n```\n\n\u003e **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin\n\u003e privileges 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/\nkubectl apply -f config/samples/api_v1alpha1_expose.yaml\n```\n\n**To delete a custom resource**\n\n```sh\nkubectl delete Expose expose-sample -n default\n```\n\n\u003e **NOTE**: Ensure that the samples has default values to test it out.\n\n### To Uninstall\n\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## Contributing\n\nThanks for taking the time to contribute to `k8s-operator`! You can work on existing issues or propose to work on a new feature.\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 2023 freedisch.\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedisch%2Fk8s-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreedisch%2Fk8s-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedisch%2Fk8s-operator/lists"}