flagger is a simple feature flag microservice backed by redis.
docker run -d -p 8082:8082 mnbbrown/flagger serve
wget https:///
cp flagctl /usr/local/bin/flagctl
sudo chmod +x /usr/local/bin/flagctl
flagctl serve
: Start the HTTP API server on port 8082flagctl set FLAG_NAME [ENV_NAME] FLAG_TYPE FLAG_VALUE
: Create or update a flagflagctl get FLAG_NAME [ENV_NAME]
: Get a flags state
Note: ENV_NAME is optional but could be useful for customising flags based on environments
GET /flags
returns a list of flagsGET /flags/$FLAG_NAME
returns a flag state.GET /flags/$FLAG_NAME/$ENVIRONMENT
returns the flag state for a particular environment. If environment is not found it will fall back to thedefault
enviornment. If thedefault
environment is not found it will fall back to a global default.
There are two differnt types of flags BOOL
and PERCENT
.
BOOL
returns the same value all the time (i.e either true or false).PERCENT
returns true $PERCENT% of the time. Useful for things like doing blue green deployments or tracing