Utilities extract Arborist data and transform it into a format that can be used by Gen3
- As a devops engineer or DAC member, in order to review current state of projects, users, policies and roles, I need to see a high fidelity document that details current state. Up until now, that has been the user.yaml document.
- As a devops engineer, in order to restore current state of projects, users, policies and roles, I need to snapshot state, move the artifact from one environment(development, testing, staging, production) to another and apply that state to the new environment. Up until now, that has been the user.yaml document.
Since we have adopted a requestor based flow, this “snapshot state” ability is missing
kubectl and access to the gen3 cluster
python3 -m venv venv ; source venv/bin/activate
pip install -r requirements.txt
pip install -e .
arborist_users --help
Usage: arborist_users [OPTIONS] COMMAND [ARGS]...
Use kubectl to extract arborist entities[resource, role, policy, etc.] from
current k8s context.
Options:
--help Show this message and exit.
Commands:
extract Extract to DATA/{context}/{entity}.json
transform Transform arborist information into DATA/{context}/user.yaml...
validate Validate user.yaml file.
ping Verify kubectl and context.
See:
DATA/<context-name>/user.yaml
DATA/<context-name>/requestor.sh