cfgen's People
cfgen's Issues
ability to store configs in configMap instead of filesystem
Feature request.
Please review possibility to save configs in configmap instead of filesystem.
Functionality to disable
configs not required in this case.
bug. conf files removed, not disabled.
Looks like service does not disable config files by moving file to <existing_file>.<current_date>.disabled
but removes it.
Maybe it is good to make it configurable?
docs. how to get services from another namespace
Need to extend documentation with details how to get services from another namespace.
For example application running in namespace "devops-system" need to generate service configs from namespace "bender".
initial task
High level description of a task
Need to create application which is listening Kubernetes API and creates bunch of nginx configs based on information in Kubernetes API.
Application should get list of services periodically. Compare this list with list of files saved in target directory.
If service exists in k8s API but does not exist in target directory application should create file with the name <service_name>.conf
in target directory.
Template of a file:
location /{{.ServiceName}} {
proxy_pass http://{{.ServiceFQDN}};
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
# next 3 headers added to support websocket
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
If service not presented in k8s API, but corresponding file exist in target directory, move it to file <existing_file>.<current_date>.disabled
<current_date>
should be in format yyyyMMddHHmmss
. Example: 20190108113405
.
ServiceFQDN is A record for the service <service_name>.<namespace>.svc.cluster.local
see https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#services for details.
Need to create
- application itself
- Dockerfile to build image
- kubernetes manifest to start
- short description in README.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.