-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Comcast/log-rules
Generate Early/Late rules - 2.7.0
- Loading branch information
Showing
31 changed files
with
4,714 additions
and
303 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,32 +2,30 @@ FROM golang:1.17-alpine | |
RUN echo '@edgemain http://dl-3.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories | ||
RUN apk add libpcap iptables haproxy iproute2 ipvsadm@edgemain gcc libc-dev git libpcap-dev && rm -rf /var/cache/apk/* | ||
WORKDIR /app/src | ||
|
||
COPY go.mod . | ||
COPY go.sum . | ||
RUN go mod download | ||
COPY . . | ||
WORKDIR /app/src/cmd/ravel | ||
|
||
RUN CGO_ENABLED=1 go build -v -o /app/src/cmd/ravel/ravel | ||
COPY gobgp_2.22.0_linux_amd64.tar.gz gobgp_2.22.0_linux_amd64.tar.gz | ||
RUN CGO_ENABLED=1 go build -o /app/src/cmd/ravel/ravel | ||
ADD https://github.com/osrg/gobgp/releases/download/v2.22.0/gobgp_2.22.0_linux_amd64.tar.gz gobgp_2.22.0_linux_amd64.tar.gz | ||
RUN tar zxf gobgp_2.22.0_linux_amd64.tar.gz | ||
RUN ls -al | ||
|
||
|
||
FROM golang:1.17-alpine | ||
|
||
FROM hub.comcast.net/k8s-eng/ravel-base:go-1.16 | ||
#ARG RAVEL_DELAY=1000 | ||
ARG SKIP_MASTER_NODE=N | ||
ARG RAVEL_LOGRULE=N | ||
ARG RAVEL_EARLYLATE=Y | ||
ENV SKIP_MASTER_NODE=$SKIP_MASTER_NODE | ||
ENV RAVEL_LOGRULE=$RAVEL_LOGRULE | ||
ENV RAVEL_EARLYLATE=$RAVEL_EARLYLATE | ||
|
||
LABEL MAINTAINER='RDEI Team <[email protected]>' | ||
RUN echo '@edgemain http://dl-3.alpinelinux.org/alpine/edge/main' >> /etc/apk/repositories | ||
RUN apk add bash openssh libpcap iptables haproxy iproute2 ipvsadm@edgemain gcc libc-dev git libpcap-dev && rm -rf /var/cache/apk/*; rm -rf /var/cache/apk/* | ||
COPY --from=0 /app/src/cmd/ravel/ravel /bin/ | ||
COPY --from=0 /app/src/cmd/ravel/ravel /app/src/cmd/ravel/gobgp /app/src/cmd/ravel/gobgpd /bin/ | ||
COPY --from=0 /app/src/cmd/ravel/ravel /bin/kube2ipvs | ||
COPY --from=0 /app/src/cmd/ravel/gobgp /bin/ | ||
COPY --from=0 /app/src/cmd/ravel/gobgpd /bin/ | ||
#COPY --from=0 /app/src/cmd/ravel/gobgp /bin/ | ||
#COPY --from=0 /app/src/cmd/ravel/gobgpd /bin/ | ||
|
||
RUN chmod 750 /bin/gobgp /bin/gobgpd /bin/ravel | ||
ENTRYPOINT ["/bin/ravel"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#TAG=v2.6.0-proto205 | ||
TAG=v2.6.0-cc20 | ||
SKIPMASTER=v2.6.1-skip-ipvsmaster | ||
|
||
# branch: lab-isolated-later: original 2.6 + logging + skip-master | ||
# branch: log-rules : original 2.6 + early-late rules + logging | ||
|
||
# v2.7: iptable version, skip-master, order-rules, group rules, reverse default for ipvs-ignore-node-cordon | ||
# v2.6.1-skip-ipvsmaster : skip-ipvs-master based on env-var. use iptables 1.6.2 | ||
# hub.comcast.net/k8s-eng/ravel:v2.6.0-proto205 -> v2.6.0-rc7 | ||
# v2.6.0-proto189 -> v2.6.0-rc4 | ||
# rc6: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto45 | ||
# rc7: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto66 | ||
# rc8: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto67 | ||
# rc9: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto68 | ||
|
||
# Not a complicated makefile, just a place to ensure | ||
# that we don't forget how to build and push to a registry. | ||
# | ||
|
||
|
||
default: build | ||
|
||
test: | ||
go test github.com/Comcast/Ravel/pkg/system -run TestNewMerge -v | ||
|
||
FORCE: ; | ||
|
||
cc: FORCE | ||
docker build -t hub.comcast.net/k8s-eng/ravel:cc -f Dockerfile . | ||
docker push hub.comcast.net/k8s-eng/ravel:cc | ||
|
||
|
||
build: | ||
#docker build --progress plain -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
docker build -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
|
||
push: | ||
#DOCKER_HOST=ssh://69.252.103.115 docker push hub.comcast.net/k8s-eng/ravel:${TAG} | ||
docker push hub.comcast.net/k8s-eng/ravel:${TAG} | ||
|
||
skipmaster: | ||
docker build --build-arg RAVEL_LOGRULE=N --build-arg SKIP_MASTER_NODE=Y -t hub.comcast.net/k8s-eng/ravel:${SKIPMASTER} -f Dockerfile . | ||
docker push hub.comcast.net/k8s-eng/ravel:${SKIPMASTER} | ||
|
||
# ipvsadm.c restore (-R) : ignore return code | ||
rc1: FORCE | ||
docker build --build-arg RAVEL_LOGRULE=N --build-arg SKIP_MASTER_NODE=N -t hub.comcast.net/k8s-eng/ravel:2.6.2-rc1 -f Dockerfile . | ||
docker push hub.comcast.net/k8s-eng/ravel:2.6.2-rc1 | ||
|
||
# ip.go : fix the Compare, comvert _ to . | ||
rc4: FORCE | ||
docker build --build-arg RAVEL_LOGRULE=N --build-arg SKIP_MASTER_NODE=N -t hub.comcast.net/k8s-eng/ravel:2.6.2-rc4 -f Dockerfile . | ||
docker push hub.comcast.net/k8s-eng/ravel:2.6.2-rc4 | ||
|
||
# both fixes | ||
rc5: FORCE | ||
docker build --build-arg RAVEL_LOGRULE=N --build-arg SKIP_MASTER_NODE=N -t hub.comcast.net/k8s-eng/ravel:2.6.2-rc5 -f Dockerfile . | ||
docker push hub.comcast.net/k8s-eng/ravel:2.6.2-rc5 | ||
|
||
|
||
|
||
default-gobgp: build-gobgp push-gobgp | ||
|
||
build-gobgp: | ||
docker build -t hub.comcast.net/k8s-eng/gobgpd:v2.2.0 -f Dockerfile.gobgp . | ||
|
||
push-gobgp: | ||
docker push hub.comcast.net/k8s-eng/gobgpd:v2.2.0 | ||
|
||
remote: | ||
DOCKER_HOST=ssh://69.252.103.115 docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
|
||
m1: | ||
DOCKER_HOST=ssh://69.252.103.115 docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
#docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
# export RAVEL_EARLYLATE=Y | ||
|
||
#TAG=v2.6.0-proto205 | ||
TAG=v2.7.0-rc1 | ||
PROD=v2.7.0 | ||
SKIPMASTER=v2.6.1-skip-ipvsmaster | ||
|
||
|
||
# branch: lab-isolated-later: original 2.6 + logging + skip-master | ||
# branch: log-rules : original 2.6 + early-late rules + logging | ||
|
||
# v2.6.1-skip-ipvsmaster : skip-ipvs-master based on env-var. use iptables 1.6.2 | ||
# hub.comcast.net/k8s-eng/ravel:v2.6.0-proto205 -> v2.6.0-rc7 | ||
# v2.6.0-proto189 -> v2.6.0-rc4 | ||
# rc6: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto45 | ||
# rc7: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto66 | ||
# rc8: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto67 | ||
# rc9: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto68 | ||
|
||
# Not a complicated makefile, just a place to ensure | ||
# that we don't forget how to build and push to a registry. | ||
# | ||
|
||
|
||
default: build | ||
|
||
test: | ||
go test github.com/Comcast/Ravel/pkg/system -run TestNewMerge -v | ||
|
||
prod: | ||
docker build -t hub.comcast.net/k8s-eng/ravel:${PROD} -f Dockerfile-2.7 . | ||
docker push hub.comcast.net/k8s-eng/ravel:${PROD} | ||
docker build -t hub.comcast.net/k8s-eng/ravel:${PROD}-1.6.2 -f Dockerfile-1.6.2 . | ||
docker push hub.comcast.net/k8s-eng/ravel:${PROD}-1.6.2 | ||
|
||
build: FORCE | ||
#docker build --progress plain -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
docker build -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile-2.7 . | ||
#docker push hub.comcast.net/k8s-eng/ravel:${TAG} | ||
|
||
|
||
skipmaster: | ||
docker build --build-arg RAVEL_LOGRULE=N --build-arg SKIP_MASTER_NODE=Y -t hub.comcast.net/k8s-eng/ravel:${SKIPMASTER} -f Dockerfile-2.7 . | ||
docker push hub.comcast.net/k8s-eng/ravel:${SKIPMASTER} | ||
|
||
|
||
|
||
default-gobgp: build-gobgp push-gobgp | ||
|
||
build-gobgp: | ||
docker build -t hub.comcast.net/k8s-eng/gobgpd:v2.2.0 -f Dockerfile.gobgp . | ||
|
||
push-gobgp: | ||
docker push hub.comcast.net/k8s-eng/gobgpd:v2.2.0 | ||
|
||
remote: | ||
DOCKER_HOST=ssh://69.252.103.115 docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile-2.7 . | ||
|
||
m1: | ||
DOCKER_HOST=ssh://69.252.103.115 docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile-2.7 . | ||
#docker buildx build --platform linux/amd64 --load -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . | ||
|
||
|
||
FORCE: ; |
Oops, something went wrong.