Skip to content

eda-labs/etc-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ETC Script

Edactl Toolbox Command script allows a user to leverage edactl command that resides in the Toolbox pod as if it was installed locally for the purposes of creating/deleting/replacing and patching EDA resources.

As edactl provides commands to create, delete, replace and patch resources from files, the script provides a way to apply leverage those commands against the files locally available on the user's machine. The undeniable benefit of edactl is that it applies all resources in a single transaction, which not only ensures consistent application, but also allows you to dry run, rollback and preview changes before applying them.

Download the script

Download the script and move it to your $PATH:

curl -o etc https://raw.githubusercontent.com/eda-labs/etc-script/refs/heads/main/etc.sh
chmod +x etc
sudo mv etc /usr/local/bin/etc

How does it work?

The script copies the files you want to apply to a temp dir on toolbox pod and runs edactl command there. The copy of the files/directories is done to ensure users can refer to local paths when using the scripts.

The script supports referencing both files and directories and allows to set multiple files/directories at once.

Usage

The repo comes with a set of sample resource files in resources directory. You can use them to test the script.

Applying all resources in a directory

Apply all resources found in resources directory recursively in a single transaction.

etc apply -f resources

Applying a single file

etc apply -f resources/dir1/bd.yaml

Applying a file and a directory

etc apply -f resources/dir1/bd.yaml -f resources/dir2

Dry run

Preview the changes that would be applied without actually applying them.

etc apply -f resources --dry-run

Deleting resources

etc delete -f resources

Patching resources

etc patch -f resources/banner.yaml --patch '[{"op": "replace", "path": "/spec/loginBanner", "value": "new value from replace"}]' --dry-run

About

edactl toolbox command script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages