Skip to content

Extract arborist entities[resource, role, policy, etc.] from current k8s context, create user.yaml

Notifications You must be signed in to change notification settings

ACED-IDP/arborist_users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arborist Users

Utilities extract Arborist data and transform it into a format that can be used by Gen3

Use case

  • 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

Dependencies

kubectl and access to the gen3 cluster

Installation


python3 -m venv venv ; source venv/bin/activate

pip install -r requirements.txt

pip install -e .

Usage

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.

Output

See:

  • DATA/<context-name>/user.yaml
  • DATA/<context-name>/requestor.sh

About

Extract arborist entities[resource, role, policy, etc.] from current k8s context, create user.yaml

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages