Skip to content

Commit

Permalink
Add tcpproxy
Browse files Browse the repository at this point in the history
tcpproxy is a subset of github.com/inetaf/tcpproxy with some
modifications:
1- Implement the method SetRoutes to allow to set routes in bulk. Also
allows deletion of routes which otherwise would be impossible.
2- Implement round robin load balancing (there was no load balancing at
all).
3- Remove unused code.
4- Append Mirantis copyright for the modifications.

Additionaly this PR had to do some modifications in the copyright
linter script and `.golangci.yaml` because this is a file copied and
modified. This is required to Apache 2.0 retribution right.

Signed-off-by: Juan-Luis de Sousa-Valadas Castaño <[email protected]>
  • Loading branch information
juanluisvaladas committed Nov 20, 2024
1 parent c01b136 commit 8032b2b
Show file tree
Hide file tree
Showing 4 changed files with 728 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ issues:
- linters:
- staticcheck
text: "^SA1019:"

# tcpproxy is copied from https://github.com/inetaf/tcpproxy/, as per
# Apache 2.0 license section 4 (Redistribution) we must keep the original header.
- path: "pkg/component/controller/cplb/tcpproxy/.*"
linters:
- goheader
4 changes: 4 additions & 0 deletions hack/copyright.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ has_date_copyright(){
# Copyright notice aren't related to the date of the document.
for i in $(find cmd hack internal inttest pkg static -type f -name '*.go' -not -name 'zz_generated*'); do
case "$i" in
pkg/component/controller/cplb/tcpproxy/*)
# These files have a special copyright due to being copied
# from github.com/inetaf/tcpproxy
;;
pkg/client/clientset/*)
if ! has_basic_copyright "$i"; then
echo "ERROR: $i doesn't have a proper copyright notice" 1>&2
Expand Down
Loading

0 comments on commit 8032b2b

Please sign in to comment.