oaodev / config-finder Goto Github PK
View Code? Open in Web Editor NEWPython library that knows how to scare up some config.
Python library that knows how to scare up some config.
cfg('key')
should look in sys.argv
for --key val
or --key=val
It would be nice to automatically have documentation of how a config finder app is configurable and what the defaults are.
cfg
could keep a record of all the keys and defaults it get's called with.
Third spot checked in finders.py
is "some line in the file at /env" However, it seems to be impossible to mount a kubernetes secret at the filesystem root. For example, trying to create a pod like:
apiVersion: v1
kind: Pod
metadata:
labels:
name: secret-test
name: secret-test
spec:
containers:
- image: alpine
name: secret-test
command:
- "tail"
- "-f"
- "/dev/null"
ports:
- containerPort: 22
volumeMounts:
- mountPath: /
name: env
volumes:
- name: env
secret:
secretName: test-secret
Leaves the pod in RunContainerError status, with the error message
Error syncing pod, skipping: failed to "StartContainer" for "secret-test" with RunContainerError: "runContainer: Error response from daemon: Invalid bind mount spec "/var/lib/kubelet/pods/03ea2d38-63d8-11e6-8479-ae880d866a65/volumes/kubernetes.io
secret/env:/": Invalid specification: destination can't be '/' in '/var/lib/kubelet/pods/03ea2d38-63d8-11e6-8479-ae880d866a65/volumes/kubernetes.iosecret/env:/'
If you change the spec.volumeMounts.mountPath
in the above YAML to (say) /secret
then it works as expected, although the config-finder would need to check /secret/env for config instead of /env
/secret/key
and /env
should be user configurable.
If we were to use configuration to turn on and off feature flags, the client could make requests with certain features turned on for that single request.
could also get scary allowing clients to turn on say "everyone is admin" mode. So security would be a concern.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.