Skip to content

Commit

Permalink
Use correct interface name for PFCP interface (N4)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Jul 8, 2024
1 parent b45a2a6 commit bc94c56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ environment:
Environment variables for templating:
```yaml
environment:
N6: "203.0.113.2"
N4: "203.0.113.2"
HTTP_ADDRESS: "192.0.2.2"
HTTP_PORT: "8080"
DEBUG: "false"
Expand Down
8 changes: 4 additions & 4 deletions srv6-ctrl/template-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
set -e
mkdir -p "$(dirname "${CONFIG_FILE}")"

if [ -z "$N6" ]; then
echo "Missing mandatory environment variable (N6)." > /dev/stderr
if [ -z "$N4" ]; then
echo "Missing mandatory environment variable (N4)." > /dev/stderr
exit 1
fi
if [ -z "$HTTP_ADDRESS" ]; then
Expand All @@ -18,14 +18,14 @@ fi

awk \
-v DEBUG="${DEBUG:-false}" \
-v N6="${N6}" \
-v N4="${N4}" \
-v HTTP_ADDRESS="${HTTP_ADDRESS}" \
-v HTTP_PORT="${HTTP_PORT:-80}" \
'{
sub(/%DEBUG/, DEBUG);
sub(/%HTTP_ADDRESS/, HTTP_ADDRESS);
sub(/%HTTP_PORT/, HTTP_PORT);
sub(/%N6/, N6);
sub(/%N4/, N4);
print;
}' \
"${CONFIG_TEMPLATE}" > "${CONFIG_FILE}"
2 changes: 1 addition & 1 deletion srv6-ctrl/template-srv6-ctrl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pfcp-address: "%N6"
pfcp-address: "%N4"
http-address: "%HTTP_ADDRESS"
http-port: "%HTTP_PORT"
debug: %DEBUG

0 comments on commit bc94c56

Please sign in to comment.