{"id":13527737,"url":"https://github.com/kube-green/kube-green","last_synced_at":"2025-05-14T11:09:49.318Z","repository":{"id":37033262,"uuid":"340965344","full_name":"kube-green/kube-green","owner":"kube-green","description":"A K8s operator to reduce CO2 footprint of your clusters","archived":false,"fork":false,"pushed_at":"2025-05-07T07:22:54.000Z","size":1656,"stargazers_count":1169,"open_issues_count":37,"forks_count":75,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-10T20:34:08.880Z","etag":null,"topics":["climate-change","cloud-native","downscale","green-software","hacktoberfest","k8s","kubernetes","resources"],"latest_commit_sha":null,"homepage":"https://kube-green.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kube-green.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-21T17:50:33.000Z","updated_at":"2025-05-10T10:31:05.000Z","dependencies_parsed_at":"2024-01-16T05:07:09.655Z","dependency_job_id":"70b10866-c28c-48ab-b67c-83a570169094","html_url":"https://github.com/kube-green/kube-green","commit_stats":{"total_commits":505,"total_committers":15,"mean_commits":"33.666666666666664","dds":"0.22178217821782176","last_synced_commit":"a6e1a2284167b90a98db1c3a670c5ab5ef1d18a6"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kube-green%2Fkube-green","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kube-green%2Fkube-green/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kube-green%2Fkube-green/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kube-green%2Fkube-green/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kube-green","download_url":"https://codeload.github.com/kube-green/kube-green/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253633020,"owners_count":21939389,"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":["climate-change","cloud-native","downscale","green-software","hacktoberfest","k8s","kubernetes","resources"],"created_at":"2024-08-01T06:01:59.221Z","updated_at":"2025-05-14T11:09:49.296Z","avatar_url":"https://github.com/kube-green.png","language":"Go","funding_links":[],"categories":["Go","Green Software Awesome List","kubernetes","Kubernetes Operators","Consumption"],"sub_categories":["Contents","Computation and Communication"],"readme":"[![Go Report Card][go-report-svg]][go-report-card]\n[![Coverage][test-and-build-svg]][test-and-build]\n[![Security][security-badge]][security-pipelines]\n[![Coverage Status][coverage-badge]][coverage]\n[![Documentations][website-badge]][website]\n[![Adopters][adopters-badge]][adopters]\n[![CNCF Landscape][cncf-badge]][cncf-landscape]\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/kube-green/kube-green/main/logo/logo-horizontal-dark.svg\"\u003e\n  \u003cimg alt=\"Dark kube-green logo\" src=\"https://raw.githubusercontent.com/kube-green/kube-green/main/logo/logo-horizontal.svg\"\u003e\n\u003c/picture\u003e\n\nHow many of your dev/preview pods stay on during weekends? Or at night? It's a waste of resources! And money! But fear not, *kube-green* is here to the rescue.\n\n*kube-green* is a simple **k8s addon** that automatically **shuts down** (some of) your **resources** when you don't need them.\n\nIf you already use *kube-green*, add you as an [adopter][add-adopters]!\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See how to install the project on a live system in our [docs](https://kube-green.dev/docs/installation/).\n\n### Prerequisites\n\nMake sure you have Go installed ([download](https://go.dev/dl/)). Version 1.19 or higher is required.\n\n## Installation\n\nTo have *kube-green* running locally just clone this repository and install the dependencies running:\n\n```golang\ngo get\n```\n\n## Running the tests\n\nThere are different types of tests in this repository.\n\nIt is possible to run all the unit tests with\n\n```sh\nmake test\n```\n\nTo run integration tests installing kube-green with kustomize, run:\n\n```sh\nmake e2e-test-kustomize\n```\n\notherwise, to run integration tests installing kube-green with helm, run:\n\n```sh\nmake e2e-test\n```\n\nIt is possible to run only a specific harness integration test, running e2e-test with the OPTION variable:\n\n```sh\nmake e2e-test OPTION=\"-run=TestSleepInfoE2E/kuttl/run_e2e_tests/harness/{TEST_NAME}\"\n```\n\n## Deployment\n\nTo deploy *kube-green* in live systems, follow the [docs](https://kube-green.dev/docs/installation/).\n\nTo run kube-green for development purpose, you can use [ko](https://ko.build/) to deploy\nin a KinD cluster.\nIt is possible to start a KinD cluster running `kind create cluster --name kube-green-development`.\nTo deploy kube-green using ko, run:\n\n```sh\nmake local-run clusterName=kube-green-development\n```\n\n## Usage\n\nThe use of this operator is very simple. Once installed on the cluster, configure the desired CRD to make it works.\n\nSee [here](https://kube-green.dev/docs/configuration/) the documentation about the configuration of the CRD.\n\n### CRD Examples\n\nPods running during working hours with Europe/Rome timezone, suspend CronJobs and exclude a deployment named `api-gateway`:\n\n```yaml\napiVersion: kube-green.com/v1alpha1\nkind: SleepInfo\nmetadata:\n  name: working-hours\nspec:\n  weekdays: \"1-5\"\n  sleepAt: \"20:00\"\n  wakeUpAt: \"08:00\"\n  timeZone: \"Europe/Rome\"\n  suspendCronJobs: true\n  excludeRef:\n    - apiVersion: \"apps/v1\"\n      kind:       Deployment\n      name:       api-gateway\n```\n\nPods sleep every night without restore:\n\n```yaml\napiVersion: kube-green.com/v1alpha1\nkind: SleepInfo\nmetadata:\n  name: working-hours-no-wakeup\nspec:\n  sleepAt: \"20:00\"\n  timeZone: Europe/Rome\n  weekdays: \"*\"\n```\n\nTo see other examples, go to [our docs](https://kube-green.dev/docs/configuration/#examples).\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [release on this repository](https://github.com/kube-green/kube-green/releases).\n\n### How to upgrade the version\n\nTo upgrade the version:\n\n1. `make release version=v{{NEW_VERSION_TO_TAG}}` where `{{NEW_VERSION_TO_TAG}}` should be replaced with the next version to upgrade. N.B.: version should include `v` as first char.\n2. `git push --tags origin v{{NEW_VERSION_TO_TAG}}`\n\n## API Reference documentation\n\nAPI reference is automatically generated with [this tool](https://github.com/ahmetb/gen-crd-api-reference-docs). To generate it automatically, are added in api versioned folder a file `doc.go` with the content of file `groupversion_info.go` and a comment with `+genclient` in the `sleepinfo_types.go` file for the resource type.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n\n## Acknowledgement\n\nSpecial thanks to [JGiola](https://github.com/JGiola) for the tech review.\n\n## Give a Star! ⭐\n\nIf you like or are using this project, please give it a star. Thanks!\n\n## Adopters\n\n[Here](https://kube-green.dev/docs/adopters/) the list of adopters of *kube-green*.\n\nIf you already use *kube-green*, add you as an [adopter][add-adopters]!\n\n[go-report-svg]: https://goreportcard.com/badge/github.com/kube-green/kube-green\n[go-report-card]: https://goreportcard.com/report/github.com/kube-green/kube-green\n[test-and-build-svg]: https://github.com/kube-green/kube-green/actions/workflows/test.yml/badge.svg\n[test-and-build]: https://github.com/kube-green/kube-green/actions/workflows/test.yml\n[coverage-badge]: https://coveralls.io/repos/github/kube-green/kube-green/badge.svg?branch=main\n[coverage]: https://coveralls.io/github/kube-green/kube-green?branch=main\n[website-badge]: https://img.shields.io/static/v1?label=kube-green\u0026color=blue\u0026message=docs\u0026style=flat\n[website]: https://kube-green.dev\n[security-badge]: https://github.com/kube-green/kube-green/actions/workflows/security.yml/badge.svg\n[security-pipelines]: https://github.com/kube-green/kube-green/actions/workflows/security.yml\n[adopters-badge]: https://img.shields.io/static/v1?label=ADOPTERS\u0026color=blue\u0026message=docs\u0026style=flat\n[adopters]: https://kube-green.dev/docs/adopters/\n[add-adopters]: https://github.com/kube-green/kube-green.github.io/blob/main/CONTRIBUTING.md#add-your-organization-to-adopters\n[cncf-badge]: https://img.shields.io/badge/CNCF%20Landscape-5699C6\n[cncf-landscape]: https://landscape.cncf.io/?item=orchestration-management--scheduling-orchestration--kube-green\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkube-green%2Fkube-green","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkube-green%2Fkube-green","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkube-green%2Fkube-green/lists"}