{"id":16655808,"url":"https://github.com/bjhaid/oga","last_synced_at":"2026-04-29T12:36:07.147Z","repository":{"id":140562495,"uuid":"105729641","full_name":"bjhaid/oga","owner":"bjhaid","description":null,"archived":false,"fork":false,"pushed_at":"2017-10-05T01:24:17.000Z","size":22425,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-26T23:24:52.796Z","etag":null,"topics":["initializer","kubernetes","slack"],"latest_commit_sha":null,"homepage":null,"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/bjhaid.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":"2017-10-04T03:54:02.000Z","updated_at":"2020-05-12T20:20:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ab1cb5c-81bf-4b78-8ecd-2ed352b40c5a","html_url":"https://github.com/bjhaid/oga","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bjhaid/oga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjhaid%2Foga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjhaid%2Foga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjhaid%2Foga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjhaid%2Foga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjhaid","download_url":"https://codeload.github.com/bjhaid/oga/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjhaid%2Foga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32426586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T12:24:25.982Z","status":"ssl_error","status_checked_at":"2026-04-29T12:24:24.439Z","response_time":110,"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":["initializer","kubernetes","slack"],"created_at":"2024-10-12T09:54:30.957Z","updated_at":"2026-04-29T12:36:07.110Z","avatar_url":"https://github.com/bjhaid.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oga\n\n_Let the bots deploy and the humans approve._\n\nOga is a [Kubernetes\nintializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/#configure-initializers-on-the-fly)\nthat blocks a deployment from initializing and requests approval from\nslack(this can be extended with different requesters in the future see\n[fake_requester](initializer/fake_requester.go) as an example) before allowing\nthe deployment to continue.\n\n## Usage\n\nCreate the initializer resource in k8s e.g:\n```bash\n$\u003e kubectl apply -f examples/initializer.yaml\n```\n\nRun the bot:\n\n```\n$\u003e ./oga -bot-name oga -slack-token \"\u003cSLACK TOKEN\u003e\"`\n```\n\n_this will be updated with a k8s deployment in the future_\n\nOn deployments that require approval, define the below annotation on them:\n\n```yaml\nmetadata:\n  annotations:\n    \"initializer.kubernetes.io/oga\": |\n      slack:\n        channel: \"#testoga\"\n        approvers:\n          - \"@bjhaid\"\n```\n\nApply the deployment and you should get a message like below in slack if it's\nconfigured correctly:\n![approval image](examples/approval_screenshot.png)\n\nOn successful approval oga will update the deployment metadata as below:\n\n```yaml\n  metadata:\n    annotations:\n      deployment.kubernetes.io/revision: \"1\"\n      initializer.kubernetes.io/oga: |\n        approved_by: |\n          Username: bjhaid, Fullname: Ayodele, Email: bjhaid@oga.com\n        slack:\n          approvers:\n          - '@bjhaid'\n          channel: '#testoga'\n```\n\nIncluding the details of the person who responded to the approval request on the annotation.\n\nIf you need to override `oga`'s approval request for any reason you can declare\nan empty initializer on your deployment configuration as below:\n\n```yaml\nmetadata:\n  initializers:\n  annotations:\n    \"initializer.kubernetes.io/oga\": |\n      slack:\n        channel: \"#testoga\"\n        approvers:\n          - \"@bjhaid\"\n```\n\n**Note this will remove all initializers including `oga`**\n\n```bash\nUsage of ./oga:\n  -alsologtostderr\n        log to standard error as well as files\n  -annotation string\n        The annotation to trigger initialization (default \"initializer.kubernetes.io/oga\")\n  -bot-name string\n        The username of the oga bot as created in slack\n  -initializer-name string\n        The initializer name (default \"oga.initializer.kubernetes.io\")\n  -kubeconfig string\n        (optional) absolute path to the kubeconfig file (default \"/Users/bjhaid/.kube/config\")\n  -log_backtrace_at value\n        when logging hits line file:N, emit a stack trace\n  -log_dir string\n        If non-empty, write log files in this directory\n  -logtostderr\n        log to standard error instead of files\n  -slack-token string\n        Slack API token\n  -stderrthreshold value\n        logs at or above this threshold go to stderr\n  -v value\n        log level for V logs\n  -vmodule value\n        comma-separated list of pattern=N settings for file-filtered logging\n```\n\n## TODO:\n- [ ] Add k8s configuration files for deploying oga to k8s.\n- [ ] Add support for slack groups.\n- [ ] High Availability of oga, currently can run only a single oga instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjhaid%2Foga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjhaid%2Foga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjhaid%2Foga/lists"}