Skip to content
Snippets Groups Projects

bug fix: L2S-M configuration wasn't properly overwriting older existing ones

Merged Alex de Cock Buning requested to merge after-netma-deployment into main
1 file
+ 37
0
Compare changes
  • Side-by-side
  • Inline
@@ -107,6 +107,43 @@ echo "Configuration deployment completed."
#!/bin/bash
# Define the output file path
output_file="./LPM/chart/values.yaml"
# Create or overwrite the file with the initial content
cat > "$output_file" << EOF
global:
nodes:
EOF
# Get the list of node names
nodes=($(kubectl get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}'))
# Initialize IP address counter starting from 2 (as per 10.0.0.(n+1))
ip_counter=2
# Loop through each node and append the required YAML content
for node in "${nodes[@]}"; do
cat >> "$output_file" << EOF
- name: $node
ip: 10.0.0.$ip_counter/24
metrics:
rttInterval: 10
throughputInterval: 20
jitterInterval: 5
EOF
ip_counter=$((ip_counter + 1))
done
# Append the network and namespace information
cat >> "$output_file" << EOF
network:
name: lpm-network
namespace: he-codeco-netma
EOF
#!/bin/bash
# Define file paths
helm_chart_path="./LPM/chart/"
non_deployments_file="non_deployments.yaml"
Loading