{"id":13820725,"url":"https://github.com/topfreegames/flux-gitlab-controller","last_synced_at":"2025-10-07T01:51:39.326Z","repository":{"id":64302156,"uuid":"261489732","full_name":"topfreegames/flux-gitlab-controller","owner":"topfreegames","description":"Flux k8s controller to sync gitlab deploy keys","archived":false,"fork":false,"pushed_at":"2023-03-09T15:41:08.000Z","size":51,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-27T23:42:03.811Z","etag":null,"topics":["flux","fluxcd","gitlab","kubernetes","kubernetes-controller"],"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/topfreegames.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":"2020-05-05T14:08:10.000Z","updated_at":"2023-07-27T10:25:18.000Z","dependencies_parsed_at":"2024-05-28T17:15:07.514Z","dependency_job_id":null,"html_url":"https://github.com/topfreegames/flux-gitlab-controller","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/topfreegames/flux-gitlab-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topfreegames%2Fflux-gitlab-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topfreegames%2Fflux-gitlab-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topfreegames%2Fflux-gitlab-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topfreegames%2Fflux-gitlab-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topfreegames","download_url":"https://codeload.github.com/topfreegames/flux-gitlab-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topfreegames%2Fflux-gitlab-controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708030,"owners_count":26031932,"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-06T02:00:05.630Z","response_time":65,"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":["flux","fluxcd","gitlab","kubernetes","kubernetes-controller"],"created_at":"2024-08-04T08:01:07.938Z","updated_at":"2025-10-07T01:51:39.300Z","avatar_url":"https://github.com/topfreegames.png","language":"Go","funding_links":[],"categories":["kubernetes"],"sub_categories":[],"readme":"# Flux gitlab controller\n\nThis repository implements a simple controller for watching Secrets created by gitlab and calling the API to update the deploy keys the specified repo\n\n**Note:** go-get or vendor this package as `github.com/topfreegames/flux-gitlab-controller`.\n\n## Details\n\nThe sample controller uses [client-go library](https://github.com/kubernetes/client-go/tree/master/tools/cache) extensively.\n\n## Running\n\n**Prerequisite**: Since the controller uses `apps/v1` deployments, the Kubernetes cluster version should be greater than 1.9.\n\n```sh\n# assumes you have a working kubeconfig, not required if operating in-cluster\ngo build\n./flux-gitlab-controller -gitlab-token $TOKEN -kubeconfig=$HOME/.kube/config\n\n# create a flux secret with the corresponding `fluxcd.io/git-url` and `fluxcd.io/sync-gc-mark` marks\nkubectl create -f artifacts/examples/flux_secret.yaml\n\n# Check that the fluxcd.io/deployKeyId has been created in the secret and that the repo contains\n# the associated deployment key\nkubectl get secret -o yaml flux-git-deploy\n```\n\nYou can also set the `gitlab-token` through the GITLAB_TOKEN env variable if you need an extra\nlayer of security on provisioning secrets to the controller\n \n## What happens if someone removes the deployment key from the application repo?\n\nIn that case, this controller won't re-create the key as we're not constantly checking for deleted keys to avoid\nputting too much pressure to the gitlab api. \n\nIn order for flux to re-create the key, the fluxcd.io/deployKeyId annotation needs to be removed\nfrom the secret so flux realizes that the secret is not synched and will recreate the appropriate key\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopfreegames%2Fflux-gitlab-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopfreegames%2Fflux-gitlab-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopfreegames%2Fflux-gitlab-controller/lists"}