From 5ebb4ba8fbe251063a6ee2ce838bac0cf9368896 Mon Sep 17 00:00:00 2001 From: Carlos Jorge Date: Tue, 17 Dec 2024 01:35:51 +0000 Subject: [PATCH] feat(graph-toolbox): support robust aliases without escaping --- charts/graph-toolbox/templates/toolbox/statefulset.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/charts/graph-toolbox/templates/toolbox/statefulset.yaml b/charts/graph-toolbox/templates/toolbox/statefulset.yaml index 252e93e3..3d86458e 100644 --- a/charts/graph-toolbox/templates/toolbox/statefulset.yaml +++ b/charts/graph-toolbox/templates/toolbox/statefulset.yaml @@ -53,8 +53,15 @@ spec: - -ac - | set -e + {{- if not (empty $values.aliases) }} + cat << 'EOF' >> ~/.bashrc {{- range $alias, $command := $values.aliases }} - echo "alias {{ $alias }}=\"{{ $command | trim }}\"" >> ~/.bashrc + alias {{ $alias }}=$(cat << 'EOA' + {{ $command | trim }} + EOA + ) + {{- end }} + EOF {{- end }} mkdir -p ~/.config/graph-cli echo "api = '{{ required "Missing configuration" $values.config.indexer.indexerAgentManagementUrl }}'" > ~/.config/graph-cli/indexing.toml