Skip to content
Snippets Groups Projects
Commit 19b11c19 authored by Alex de Cock Buning's avatar Alex de Cock Buning
Browse files

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

parent 99ecf29e
No related branches found
No related tags found
1 merge request!14bug fix: L2S-M configuration wasn't properly overwriting older existing ones
Pipeline #56377 failed
...@@ -107,6 +107,43 @@ echo "Configuration deployment completed." ...@@ -107,6 +107,43 @@ echo "Configuration deployment completed."
#!/bin/bash #!/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 # Define file paths
helm_chart_path="./LPM/chart/" helm_chart_path="./LPM/chart/"
non_deployments_file="non_deployments.yaml" non_deployments_file="non_deployments.yaml"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment