{"id":42964615,"url":"https://github.com/bilalcaliskan/nginx-conf-generator","last_synced_at":"2026-01-30T23:49:35.946Z","repository":{"id":37266280,"uuid":"305173224","full_name":"bilalcaliskan/nginx-conf-generator","owner":"bilalcaliskan","description":"A fancy tool which manages Nginx configuration according to Kubernetes NodePort type services","archived":false,"fork":false,"pushed_at":"2024-10-28T21:13:19.000Z","size":504,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T04:16:38.367Z","etag":null,"topics":["client-go","golang","k8s","kubernetes","nginx"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bilalcaliskan.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":"2020-10-18T18:50:15.000Z","updated_at":"2024-06-02T10:00:38.000Z","dependencies_parsed_at":"2023-12-19T00:47:27.072Z","dependency_job_id":"d4d4c117-673e-4f06-a813-d4d7b8f7d7eb","html_url":"https://github.com/bilalcaliskan/nginx-conf-generator","commit_stats":{"total_commits":208,"total_committers":2,"mean_commits":104.0,"dds":"0.27403846153846156","last_synced_commit":"b9033656dfdfb4e3285bb459f48aeccd2b5367d3"},"previous_names":[],"tags_count":107,"template":false,"template_full_name":null,"purl":"pkg:github/bilalcaliskan/nginx-conf-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilalcaliskan%2Fnginx-conf-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilalcaliskan%2Fnginx-conf-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilalcaliskan%2Fnginx-conf-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilalcaliskan%2Fnginx-conf-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bilalcaliskan","download_url":"https://codeload.github.com/bilalcaliskan/nginx-conf-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bilalcaliskan%2Fnginx-conf-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["client-go","golang","k8s","kubernetes","nginx"],"created_at":"2026-01-30T23:49:35.330Z","updated_at":"2026-01-30T23:49:35.938Z","avatar_url":"https://github.com/bilalcaliskan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nginx Conf Generator\n[![CI](https://github.com/bilalcaliskan/nginx-conf-generator/workflows/CI/badge.svg?event=push)](https://github.com/bilalcaliskan/nginx-conf-generator/actions?query=workflow%3ACI)\n[![Go Report Card](https://goreportcard.com/badge/github.com/bilalcaliskan/nginx-conf-generator)](https://goreportcard.com/report/github.com/bilalcaliskan/nginx-conf-generator)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=bilalcaliskan_nginx-conf-generator\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=bilalcaliskan_nginx-conf-generator)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=bilalcaliskan_nginx-conf-generator\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=bilalcaliskan_nginx-conf-generator)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=bilalcaliskan_nginx-conf-generator\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=bilalcaliskan_nginx-conf-generator)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=bilalcaliskan_nginx-conf-generator\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=bilalcaliskan_nginx-conf-generator)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=bilalcaliskan_nginx-conf-generator\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=bilalcaliskan_nginx-conf-generator)\n[![Release](https://img.shields.io/github/release/bilalcaliskan/nginx-conf-generator.svg)](https://github.com/bilalcaliskan/nginx-conf-generator/releases/latest)\n[![Go version](https://img.shields.io/github/go-mod/go-version/bilalcaliskan/nginx-conf-generator)](https://github.com/bilalcaliskan/nginx-conf-generator)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nThat tool uses [client-go](https://github.com/kubernetes/client-go) to communicate with multi Kubernetes clusters and\ngets the port of NodePort type service which contains specific annotation. Then modifies\nthe Nginx configuration and reloads the Nginx process.\n\n\n## Prerequisites\nnginx-conf-generator uses the kubeconfig file for authentication and authorization with Kubernetes cluster.\nYou should ensure that given kubeconfig file has read only access on the target cluster.\n\nAlso nginx-conf-generator needs to reload nginx process when necessary, you must run it with root user.\n\n## Configuration\nnginx-conf-generator can be customized with several command line arguments:\n```\nUsage:\n  nginx-conf-generator [flags]\n\nFlags:\n      --custom-annotation string      annotation to specify selectable services (default \"nginx-conf-generator/enabled\")\n  -h, --help                          help for nginx-conf-generator\n      --kubeconfig-paths string       comma separated list of kubeconfig file paths to access with the cluster (default \"/home/joshsagredo/.kube/config\")\n      --metrics-endpoint string       endpoint to provide prometheus metrics (default \"/metrics\")\n      --metrics-port int              port of the metrics server (default 5000)\n      --template-input-file string    path of the template input file to be able to render and print to --template-output-file (default \"resources/ncg.conf.tmpl\")\n      --template-output-file string   rendered output file path which is a valid Nginx conf file (default \"/etc/nginx/conf.d/ncg.conf\")\n  -v, --verbose                       verbose output of the logging library (default false)\n      --version                       version for nginx-conf-generator\n      --worker-node-label string      label to specify worker nodes (default \"worker\")\n```\n\n\u003e That tool should be run on a Linux host and the user who runs the binary file nginx-conf-generator\nshould have permissions to edit **--template-output-file** file and reload nginx process using below command:\n\u003e ```shell\n\u003e $ nginx -s reload\n\u003e ```\n\n\u003e If you want to cover multiple kubernetes clusters, add comma seperated list of kubeconfig paths with **--kubeconfig-paths** argument.\n\n## Installation\n### Binary\nBinary can be downloaded from [Releases](https://github.com/bilalcaliskan/nginx-conf-generator/releases) page.\n\nAfter then, you can simply run binary by providing required command line arguments:\n```shell\n$ ./nginx-conf-generator --kubeconfig-paths=~/.kube/config1,~/.kube/config2 --custom-annotation nginx-conf-generator/enabled\n```\n\n### Homebrew\nThis project can be installed with [Homebrew](https://brew.sh/):\n```\nbrew tap bilalcaliskan/tap\nbrew install bilalcaliskan/tap/nginx-conf-generator\n```\n\n## Development\nThis project requires below tools while developing:\n- [Golang 1.20](https://golang.org/doc/go1.20)\n- [pre-commit](https://pre-commit.com/)\n- [golangci-lint](https://golangci-lint.run/usage/install/) - required by [pre-commit](https://pre-commit.com/)\n- [gocyclo](https://github.com/fzipp/gocyclo) - required by [pre-commit](https://pre-commit.com/)\n\nAfter you installed [pre-commit](https://pre-commit.com/), simply run below command to prepare your development environment:\n```shell\n$ pre-commit install -c build/ci/.pre-commit-config.yaml\n```\n\n## License\nApache License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilalcaliskan%2Fnginx-conf-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilalcaliskan%2Fnginx-conf-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilalcaliskan%2Fnginx-conf-generator/lists"}