Skip to content

Commit

Permalink
Merge pull request #28 from louisroyer-docker/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
louisroyer authored Jun 21, 2024
2 parents 28392b3 + e1fd1b2 commit 0b1b15a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ environment:
behavior: "End"
provider: "Linux"
LINUX_HEADEND_SET_SOURCE_ADDRESS: fd00:51D5:0000::
IPV4_HEADEND_PREFIX: 10.0.200.3/32
GTP4_HEADEND_PREFIX: 10.0.200.3/32
```

#### Container deployment
Expand Down
2 changes: 1 addition & 1 deletion srv6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: MIT

FROM golang:1.21 AS builder
ARG COMMIT=5e9f578fe6e58893afd39e05473810727b8815f4
ARG COMMIT=570a75410197226e0985dfacddd69012acb14368
RUN : ${COMMIT:? Missing build-arg COMMIT.} && go install github.com/nextmn/srv6@${COMMIT} \
&& find /go/pkg/mod/github.com/nextmn -iname 'srv6@*' -type d -exec ln -s {} /configuration \;

Expand Down
5 changes: 5 additions & 0 deletions srv6/template-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ fi
if [ -n "$IPV4_HEADEND_PREFIX" ]; then
IPV4_HEADEND_PREFIX_SUB="ipv4-headend-prefix: \"${IPV4_HEADEND_PREFIX}\""
fi
if [ -n "$GTP4_HEADEND_PREFIX" ]; then
GTP4_HEADEND_PREFIX_SUB="gtp4-headend-prefix: \"${GTP4_HEADEND_PREFIX}\""
fi

awk \
-v DEBUG="${DEBUG:-false}" \
Expand All @@ -70,6 +73,7 @@ awk \
-v ENDPOINTS="${ENDPOINTS_SUB}" \
-v LOCATOR="${LOCATOR}" \
-v IPV4_HEADEND_PREFIX="${IPV4_HEADEND_PREFIX_SUB}" \
-v GTP4_HEADEND_PREFIX="${GTP4_HEADEND_PREFIX_SUB}" \
-v LINUX_HEADEND_SET_SOURCE_ADDRESS="${LINUX_HEADEND_SET_SOURCE_ADDRESS_SUB}" \
-v HTTP_ADDRESS="${HTTP_ADDRESS}" \
-v HTTP_PORT="${HTTP_PORT:-80}" \
Expand All @@ -82,6 +86,7 @@ awk \
sub(/%ENDPOINTS/, ENDPOINTS);
sub(/%LOCATOR/, LOCATOR);
sub(/%IPV4_HEADEND_PREFIX/,IPV4_HEADEND_PREFIX);
sub(/%GTP4_HEADEND_PREFIX/,GTP4_HEADEND_PREFIX);
sub(/%LINUX_HEADEND_SET_SOURCE_ADDRESS/, LINUX_HEADEND_SET_SOURCE_ADDRESS);
sub(/%HTTP_ADDRESS/, HTTP_ADDRESS);
sub(/%HTTP_PORT/, HTTP_PORT);
Expand Down
1 change: 1 addition & 0 deletions srv6/template-srv6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ backbone-ip: "%BACKBONE_IP"

%LINUX_HEADEND_SET_SOURCE_ADDRESS
%IPV4_HEADEND_PREFIX
%GTP4_HEADEND_PREFIX
%HEADENDS

locator: %LOCATOR
Expand Down

0 comments on commit 0b1b15a

Please sign in to comment.