{"id":37563960,"url":"https://github.com/dfds/k8s-janitor","last_synced_at":"2026-01-16T09:11:59.089Z","repository":{"id":34186961,"uuid":"161489720","full_name":"dfds/k8s-janitor","owner":"dfds","description":"Service for mapping IAM roles to k8s cluster roles","archived":false,"fork":false,"pushed_at":"2025-03-20T07:58:05.000Z","size":368,"stargazers_count":0,"open_issues_count":2,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-20T08:39:27.641Z","etag":null,"topics":["aws","aws-iam","eks-roles","kubernetes-setup","self-service"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/dfds.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":"2018-12-12T13:06:52.000Z","updated_at":"2025-03-20T07:58:06.000Z","dependencies_parsed_at":"2024-01-08T11:03:21.495Z","dependency_job_id":"3f411372-46ad-4f9a-9531-d55cbb3f9a13","html_url":"https://github.com/dfds/k8s-janitor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfds/k8s-janitor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fk8s-janitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fk8s-janitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fk8s-janitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fk8s-janitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfds","download_url":"https://codeload.github.com/dfds/k8s-janitor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfds%2Fk8s-janitor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"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":["aws","aws-iam","eks-roles","kubernetes-setup","self-service"],"created_at":"2026-01-16T09:11:59.015Z","updated_at":"2026-01-16T09:11:59.071Z","avatar_url":"https://github.com/dfds.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# k8s-janitor Service\n\n[![Build Status](https://dev.azure.com/dfds/DevelopmentExcellence/_apis/build/status/self-service/K8s-Janitor-CI?branchName=master)](https://dev.azure.com/dfds/DevelopmentExcellence/_build/latest?definitionId=967\u0026branchName=master)\n\nService managing k8s cluster with our business logics.\n\n## Development\n\n### Prerequisites\n\n- .NET Core 2.2 SDK ([download](https://dotnet.microsoft.com/download/dotnet-core/2.2))\n- Docker (any relatively new version will do)\n- All scripts are written in bash. You can use gitbash on windows\n\nOther than the above prerequisites this application requires no additional\nspecial setup on your machine. Open the solution or root folder in your\neditor of choice and start cracking!\n\n## Access to Kubernetes\n\nThe The application operates on a Kubernetes cluster. The credentials from current-context in ./kube/config will be used if the environment variables `KUBERNETES_SERVICE_HOST` \u0026 `KUBERNETES_SERVICE_PORT` are not set.\n\n## Running the application locally\n\nThe folder local-development contains bash scripts that enables you to run the application locally while developing.\n\n- start-dependencies.sh starts a kafka cluster\n- watch-run.sh starts the api project with environment variables set for local development and will rebuild on file change\n- watch-run-unit-tests.sh runs unit tests and will rerun them on file change\n\nThe file `rest-request.http` contains some rest request you can use for development, you can use the vsts plugin `humao.rest-client` to execute the requests\n\n### Environment variables\n\nThe application requires the following environment variables when running locally:\n\n| Name | Description |\n|------|-------------|\n| KUBERNETES_SERVICE_KAFKA_BOOTSTRAP_SERVERS | A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.\n| KUBERNETES_SERVICE_KAFKA_GROUP_ID | Id of the consumer group that the application will join. Only a single consumer in a group will read a message.\n| KUBERNETES_SERVICE_KAFKA_ENABLE_AUTO_COMMIT | commit the Offset on Consumer fetches or manually.\n\n### Running in a container\n\nTo run the application you first need to execute a script located in the repository\nroot. This will restore any dependencies and build both the application and also a\ncontainer image using Docker. Run the following on your command line in the repository\nroot:\n\n```shell\n./pipeline.sh\n```\nNow you should be able to start a container by running the following on your command line:\n\n```shell\ndocker run -it --rm -p 8080:80 k8s-janitor\n```\n\nYou should be able to navigate to `http://localhost:8080` in a browser.\n\n## Running in production\n\n### Environment variables\n\nThe application requires the following environment variables when running in production:\n\n| Name | Description |\n|------|-------------|\n| AWS_S3_BUCKET_REGION | The region the buckets exist in|\n| AWS_S3_BUCKET_NAME_CONFIG_MAP | name of the bucket containing the config map file\n| CONFIG_MAP_FILE_NAME | Name of the file the configmap will be stored in.\n| KUBERNETES_SERVICE_KAFKA_BOOTSTRAP_SERVERS | A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.\n| KUBERNETES_SERVICE_KAFKA_GROUP_ID | Id of the consumer group that the application will join. Only a single consumer in a group will read a message.\n| KUBERNETES_SERVICE_KAFKA_SASL_PASSWORD | Kafka Simple Authentication and Security Layer password\n| KUBERNETES_SERVICE_KAFKA_SASL_USERNAME |  Kafka Simple Authentication and Security Layer username\n\n\n## Deployment prerequisites\n\nWith the change to scoped Kubernetes service connections during deploment, certain manifests have been moved out of the *k8s* directory and moved to the *k8s_initial* directory.\n\nThe manifests within *k8s_initial* will have to be run manually or with a different service connection due to elevated rights.\n\n---\n\nIf the scoped service account is missing for deployment, see https://wiki.dfds.cloud/en/teams/devex/selfservice/Kubernetes-selfservice-deployment-setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfds%2Fk8s-janitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfds%2Fk8s-janitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfds%2Fk8s-janitor/lists"}