Skip to content

Commit

Permalink
Fix sed
Browse files Browse the repository at this point in the history
  • Loading branch information
akodali18 committed May 7, 2024
1 parent 65772e7 commit c4a9dc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions operator/components/pixie/generate_yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for index in "${!original_file_names[@]}"; do
num="$(printf "%02d" "$(find splits -maxdepth 1 -name '*.yaml' | wc -l | xargs)")"
new_file="splits/$num-$kind-$name.yaml"
fi
sed 's/namespace: pl/namespace: observability-system}/g' "$original_file_name" | sed '1d' > "$new_file"
sed 's/namespace: pl/namespace: observability-system/g' "$original_file_name" | sed '1d' > "$new_file"
rm "$original_file_name"
done

Expand Down Expand Up @@ -106,9 +106,9 @@ echo " cluster-name: {{ .ClusterName }}" >> "${REPO_ROOT}/operator/components/p
sed -i 's/ PL_CLUSTER_NAME: ""/ PL_CLUSTER_NAME: {{ .ClusterName }}/' "${REPO_ROOT}/operator/components/pixie/18-configmap-pl-cloud-config.yaml"

# Iterate over files in the directory here as a workaround for yq interfering with namespace templatization instead of line 43
for file in "${REPO_ROOT}"/operator/components/pixie/*; do
for file in "${REPO_ROOT}"/operator/components/pixie/*.yaml; do
if [ -f "$file" ]; then
sed -i 's/namespace: {{ .observability-system }}/namespace: {{ .Namespace }}/g' "$file"
sed -i 's/namespace: observability-system/namespace: {{ .Namespace }}/g' "$file"
fi
done

Expand Down

0 comments on commit c4a9dc6

Please sign in to comment.