Running Custom Commands in Ranger TagSync
Overview¶
- Ranger Tagsync supports running custom commands on Kubernetes. You can run custom commands to the Ranger Tagsync service to perform additional tasks. This document provides the steps to run the custom commands to the Ranger Tagsync service.
Configuration steps to run custom commands in Ranger TagSync¶
To run the custom commands in Ranger TagSync Pod, follow the below steps:
- SSH into the instance where Privacera Manager is installed.
- Navigate to the privacera-manager directory using the following command:
Bash - Enable Ranger TagSync by copying
var.ranger-tagsync.yml
to the custom-vars folder.Bash - Edit the 'var.ranger-tagsync.yml' file and follow the below steps to configure Ranger TagSync in Privacera.
Bash -
Uncomment
TAGSYNC_K8S_CONTAINER_COMMAND_ENABLE
,TAGSYNC_K8S_CONTAINER_COMMAND_LIST
properties to enable custom command execution. In the command list variable, pass all the commands you want to run. Here is the example:Property Description Default value TAGSYNC_K8S_CONTAINER_COMMAND_ENABLE Set to true to allow commands to be executed by Tagsync on Kubernetes False TAGSYNC_K8S_CONTAINER_COMMAND_LIST List of commands that Tagsync should execute on Kubernetes. The syntax of the value of the property should be as shown below Blank -
If you want to provide the custom entrypoint script, you can do so by uncommenting the
TAGSYNC_K8S_CONTAINER_COMMAND_ENTRYPOINT
property in thevars.ranger-tagsync.yml
file.Bash -
Add the below property in the yml file:
Property Description Default Value TAGSYNC_K8S_CONTAINER_ENTRYPOINT_COMMAND Path to a custom entry point for commands "/entrypoint/ranger-tagsync-entrypoint.sh start” Here is an example of the
vars.ranger-tagsync.yml
file with the custom command configuration:8. After adding the above properties, update your Privacera Manager platform instance by following the Restart Services section.YAML
- Prev topic: Advanced Configuration
- Next topic: Troubleshooting Ranger Tagysync