{"id":27155983,"url":"https://github.com/cloudsteak/scale-operator","last_synced_at":"2025-04-08T19:57:29.221Z","repository":{"id":247406243,"uuid":"825761852","full_name":"cloudsteak/scale-operator","owner":"cloudsteak","description":"Kubernetes time based scale operator","archived":false,"fork":false,"pushed_at":"2024-07-09T12:44:49.000Z","size":23087,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-07-09T16:30:05.265Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudsteak.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,"publiccode":null,"codemeta":null}},"created_at":"2024-07-08T12:53:20.000Z","updated_at":"2024-07-09T12:44:57.000Z","dependencies_parsed_at":"2024-07-08T16:14:45.129Z","dependency_job_id":"edb9a6e9-9e40-45ae-a365-cb9216aa1d5e","html_url":"https://github.com/cloudsteak/scale-operator","commit_stats":null,"previous_names":["cloudsteak/scale-operator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fscale-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fscale-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fscale-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fscale-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudsteak","download_url":"https://codeload.github.com/cloudsteak/scale-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918923,"owners_count":21018044,"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":[],"created_at":"2025-04-08T19:57:28.397Z","updated_at":"2025-04-08T19:57:29.213Z","avatar_url":"https://github.com/cloudsteak.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scale-operator\n\nKubernetes time based scale operator\n\n## Commands\n\n1. Create project\n\n```bash\nkubebuilder init --domain scaler.cloudsteak.com --owner \"CloudSteak\" --repo github.com/cloudsteak/scale-operator.git\n```\n\n2. Create API\n\n```bash\nkubebuilder create api --kind Scaler --version v1alpha1 --group api\n```\n\n3. Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.\n\n```bash\nmake generate\n```\n\n4. Create manifests (CRD, RBAC and Controller)\n\n```bash\nmake manifests\n```\n\n5. Develop your code\n\n6. Install CRDs\n\n```bash\nmake install\n```\n\n7. Create deployment\n\n```bash\nkubectl create deploy nginx --image=nginx\n```\n\n8. Configure scaler\n\n```bash\nnano config/samples/api_v1alpha1_scaler.yaml\n```\n\n```yaml\nspec:\n  start: 5 # UTC time\n  end: 11 # UTC time\n  replicas: 2\n  deployments:\n    - name: nginx\n      namespace: nginx\n```\n\n9. Create scaler\n\n```bash\nkubectl apply -f config/samples/api_v1alpha1_scaler.yaml\n```\n\n10. Run the controller\n\n```bash\nmake run\n```\n\n11. Check output\n\n\\*\\* Scale up\n\n```bash\n2024-07-08T07:41:02+02:00       INFO    --- Scaling up deployments      {\"controller\": \"scaler\", \"controllerGroup\": \"api.scaler.cloudsteak.com\", \"controllerKind\": \"Scaler\", \"Scaler\": {\"name\":\"scaler-sample\",\"namespace\":\"default\"}, \"namespace\": \"default\", \"name\": \"scaler-sample\", \"reconcileID\": \"d113f2c7-e8d2-4d9a-a3f9-3b51134e7dd1\"}\n2024-07-08T07:41:02+02:00       INFO    Scaling Deployment      {\"name\": \"nginx\", \"namespace\": \"default\", \"replicas_to\": 2, \"replicas_from\": 1}\n```\n\n\\*\\* Scale down\n\n```bash\n2024-07-08T16:40:02+02:00       INFO    --- Scaling down deployments    {\"controller\": \"scaler\", \"controllerGroup\": \"api.scaler.cloudsteak.com\", \"controllerKind\": \"Scaler\", \"Scaler\": {\"name\":\"scaler-sample\",\"namespace\":\"default\"}, \"namespace\": \"default\", \"name\": \"scaler-sample\", \"reconcileID\": \"c0668843-f7ee-4c7a-99d6-7cf6e5fbeb0f\"}\n2024-07-08T16:40:02+02:00       INFO    Scaling Deployment      {\"name\": \"nginx\", \"namespace\": \"default\", \"replicas_to\": 1, \"replicas_from\": 2}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fscale-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudsteak%2Fscale-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fscale-operator/lists"}