Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downstream sync: July '21 #62

Merged
merged 79 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
21653b1
whereabouts.kubeconfig wrong in IPv6 only env
ohamada Jul 16, 2020
eeca015
Change error message
s1061123 Aug 13, 2020
71f788c
Merge pull request #54 from s1061123/fix/check_kubeconfig_stat
dougbtv Aug 13, 2020
23ba228
Specifiy image repo URL explicitly
s1061123 Aug 31, 2020
1e071f2
Merge pull request #56 from s1061123/add/fix-image-url
dougbtv Aug 31, 2020
8eea580
Fixing wrong DNS-1123 name for some IPv6 addresses
dougbtv Sep 8, 2020
04ed52b
Merge pull request #61 from dougbtv/ipv6-dns-1123-bugfix
dougbtv Sep 8, 2020
2d28b21
Add a more meaningful error for invalid CIDR
dougbtv Oct 22, 2020
8b1d7dd
Merge pull request #66 from dougbtv/fix-invalid-cidr-error
dougbtv Oct 22, 2020
1f9fe7f
Adds the missing error/log/warn methods to the install-cni.sh
dougbtv Oct 26, 2020
9eaeacc
Merge pull request #47 from ohamada/fix/confipv6
dougbtv Oct 26, 2020
0fed782
Merge pull request #67 from dougbtv/update-install-cni-sh
dougbtv Oct 27, 2020
57008a9
Create Whereabouts flatfile config by default
xagent003 Sep 3, 2020
7057d86
[autoconfig-by-default] Updates install script /host directory, refac…
dougbtv Sep 17, 2020
ba456d2
Excluded subnet handling for ipv6
shivakumargn Nov 10, 2020
f911376
Merge pull request #73 from dougbtv/develop
dougbtv Nov 12, 2020
36bc6e1
Removes error when deallocating IP errors out, instead just warns.
dougbtv Nov 6, 2020
a5227d6
Merge pull request #74 from dougbtv/stuck-creating
dougbtv Nov 13, 2020
e30a59a
Merge pull request #69 from dougbtv/autoconfig-by-default
dougbtv Nov 19, 2020
e88ef05
Logic for IPv6 assignment should not omit the broadcast addresses
dougbtv Dec 2, 2020
8996724
Merge pull request #77 from dougbtv/fix-ipv6-broadcast-omission
dougbtv Dec 3, 2020
89790a8
The first example can drop the optional parameters
dougbtv Dec 16, 2020
d1cc539
Merge pull request #81 from dougbtv/update-example
dougbtv Dec 17, 2020
ee452f1
updated readme with instructions on how to install using helm3
jdambly-ns Dec 18, 2020
f13aeef
Merge pull request #82 from jdambly/helm-chart
dougbtv Dec 18, 2020
34e151b
README incorrectly stated Whereabouts requires three parameters
dougbtv Feb 16, 2021
daf5995
Merge pull request #90 from dougbtv/doc-bug-required-params
dougbtv Feb 16, 2021
6feeed2
[travis] Adds a login so we can pull images from the registry
dougbtv Feb 16, 2021
96ef85c
Merge pull request #91 from dougbtv/update-travis-docker-login
dougbtv Feb 16, 2021
0f0a9e5
Change CI pipeline from travis CI to github actions
s1061123 Feb 22, 2021
1368fd9
Merge pull request #92 from s1061123/dev/use-github-actions
dougbtv Feb 22, 2021
c1d93ef
Fix github actions
s1061123 Feb 22, 2021
860f2fa
Merge pull request #93 from s1061123/fix/gh-actions
dougbtv Feb 22, 2021
81ce1c0
[WIP] Has unit tests and debug output for starts-with-zero-ipv6-problem
dougbtv Jan 25, 2021
b5d36a4
Remove bigint code to fix starts-with-zero-ipv6-problem
s1061123 Feb 16, 2021
9bfaa03
Update method names and unit test descriptions
dougbtv Feb 16, 2021
9e26db3
Merge pull request #89 from s1061123/fix/so-long-bigint
dougbtv Feb 22, 2021
61bb39a
feat: add arm64 dockerfile and add github action steps for new arch (…
macneib Mar 2, 2021
54b19c8
Enrich the IP allocation data structure to store the Pod reference (#86)
TothFerenc Mar 3, 2021
e9b7828
Update protobuf per CVE-2021-3121
dougbtv Mar 10, 2021
2096e5f
Fix IP address type size to 16 bytes
s1061123 Mar 29, 2021
65a6e9b
Update ippools CRD to apiextensions.k8s.io/v1
s1061123 Apr 26, 2021
cb38860
Fix github action due to org change.
s1061123 Apr 26, 2021
0308eab
Change container image location
s1061123 Apr 26, 2021
5e8cafd
Fix typo in hack/build-go.sh
antoninbas May 18, 2021
803451d
[WIP] add leader election for Kubernetes storage
s1061123 Jun 18, 2021
431f091
ippools schema: add podref
maiqueb Jun 30, 2021
710bcfd
Merge pull request #116 from maiqueb/add-podref-to-ippools-schema
dougbtv Jun 30, 2021
bc3d80c
build: update openshift build image to golang 1.15
maiqueb Jul 8, 2021
f16a162
Updates image push on release to refer to correct dockerfile location
dougbtv Jul 8, 2021
aec29ad
Merge pull request #122 from k8snetworkplumbingwg/bugfix/imagepush-do…
dougbtv Jul 8, 2021
f1047ee
Merge pull request #121 from maiqueb/bump-openshift-build-img
dougbtv Jul 8, 2021
5b52948
removes wait from kubernetes.go for leader election, adds configurabl…
dougbtv Jun 24, 2021
6cb8c1b
Merge pull request #113 from k8snetworkplumbingwg/add-leader-election
dougbtv Jul 21, 2021
0914add
build: vendor leader election dependencies
maiqueb Jul 21, 2021
774b690
[overlappingranges] Adds functionality for overlapping ranges
dougbtv Jul 15, 2020
dc798a5
Remove unused parameters from allocate.DeallocateIP
maiqueb Jul 8, 2021
1d9531a
add podref to overlapping ranges CRD
maiqueb Jul 12, 2021
0fc0760
Merge pull request #124 from maiqueb/add-leader-election-vendoring
dougbtv Jul 21, 2021
18e9e2b
Merge pull request #120 from maiqueb/cherry-pick-overlapping-ranges-t…
dougbtv Jul 21, 2021
ffdb682
Extract the kubernetes connection related data to a struct
maiqueb Jun 29, 2021
ac7507e
ip-reconciler: add new binary
maiqueb Jun 29, 2021
7d70fb8
Generate the Kubernetes client object
maiqueb Jun 29, 2021
edf1bf5
Have IPReservation implement the Stringer interface
maiqueb Jun 30, 2021
34acf15
Export find IPReservation matching ID to a func
maiqueb Jun 30, 2021
4e0aa2e
ip-reconciler: find and remove orphaned IP addresses
maiqueb Jun 29, 2021
8f73197
reconciler: add e2e tests
maiqueb Jul 2, 2021
94c6bd1
ip-reconciler: fire up cronjob every 5 mins
maiqueb Jul 5, 2021
2f3f64e
ip-reconciler: add unit tests
maiqueb Jul 7, 2021
90c7617
ip-reconciler: add plumbers network status entity
maiqueb Jul 16, 2021
8fc04e4
ip-reconciler: also account for the pods IP addresses
maiqueb Jul 16, 2021
5ed98e5
ip-reconciler, docs: mention the reconciler in the README
maiqueb Jul 19, 2021
66b75ad
ip-reconciler: simplify ip looper code
maiqueb Jul 20, 2021
0154617
reconcile cluster wide IPs
maiqueb Jul 20, 2021
5f160d8
e2e test overlapping IPs
maiqueb Jul 21, 2021
d1b0bf0
ip-reconciler: improve efficiency
maiqueb Jul 22, 2021
0fa6f42
Merge pull request #118 from maiqueb/ip-ranges-cleanup
dougbtv Jul 22, 2021
ab4af5d
Merge branch 'master' into HEAD
dougbtv Jul 22, 2021
9c65b3b
Changes README back to the openshift style one, restores Dockerfile.o…
dougbtv Jul 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on: [push, pull_request]
name: Build
jobs:
build:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
#goarch: [386, amd64, arm, ppc64le, arm64]
goarch: [amd64, arm64]
os: [ubuntu-latest] #, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2

- name: Install kubebuilder tools
run: ./hack/install-kubebuilder-tools.sh

- name: Generate code
run: ./hack/generate-code.sh

- name: Build
env:
GOARCH: ${{ matrix.goarch }}
GOOS: ${{ matrix.goos }}
run: ./hack/build-go.sh
56 changes: 56 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Image build
on: [pull_request]
jobs:
build-amd64:
name: Image build/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build container image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ghcr.io/${{ github.repository }}:latest-amd64
file: Dockerfile

build-openshift:
name: Image build/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build container image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: dougbtv/whereabouts-ocp
file: Dockerfile.openshift

build-arm64:
name: Image build/arm64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build container image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: ghcr.io/${{ github.repository }}:latest-arm64
file: Dockerfile.arm64
61 changes: 61 additions & 0 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Image push for master
on:
push:
branches:
- master
env:
image-push-owner: 'k8snetworkplumbingwg'
jobs:
push-amd64:
name: Image push/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest-amd64
file: Dockerfile

push-origin:
name: Image push/origin
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest-ocp
file: Dockerfile.openshift
77 changes: 77 additions & 0 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Image push release
on:
push:
tags:
- v*
env:
image-push-owner: 'k8snetworkplumbingwg'
jobs:
push-amd64:
name: Image push/amd64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository }}
tag-latest: false

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ steps.docker_meta.outputs.tags }}-amd64
file: Dockerfile

push-arm64:
name: Image push/arm64
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ghcr.io/${{ github.repository }}
tag-latest: false

- name: Push container image
if: github.repository_owner == 'k8snetworkplumbingwg'
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
${{ steps.docker_meta.outputs.tags }}-arm64
file: Dockerfile
61 changes: 61 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
#go-version: [1.15.x, 1.16.x]
go-version: [1.15.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2

- name: Run Revive Action by building from repository
uses: morphy2k/revive-action@v1.4.1
with:
exclude: "./vendor/..."
name: "Revive"

- name: Install kubebuilder tools
run: ./hack/install-kubebuilder-tools.sh

- name: Generate code
run: ./hack/generate-code.sh

- name: Run go fmt
run: go fmt ./...
#run: diff -u <(echo -n) <(gofmt -d -s .)

- name: Run go vet
run: go vet ./...

- name: Install golint
run: GO111MODULE=off GOBIN=$(pwd)/bin go get golang.org/x/lint/golint

- name: Test
run: sudo PATH=${PATH}:./bin ./hack/test-go.sh

- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
flag-name: Go-${{ matrix.go }}
parallel: true
env:
KUBEBUILDER_ASSETS: "$(pwd)/bin"

# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
56 changes: 0 additions & 56 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ COPY . .
RUN ./hack/build-go.sh

FROM alpine:latest
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/whereabouts
COPY --from=0 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts .
COPY --from=0 /go/src/github.com/dougbtv/whereabouts/bin/ip-reconciler .
COPY script/install-cni.sh .
CMD ["/install-cni.sh"]
CMD ["/install-cni.sh"]
16 changes: 16 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.13
ADD . /usr/src/whereabouts

ENV GOARCH "arm64"
ENV GOOS "linux"

RUN mkdir -p $GOPATH/src/github.com/dougbtv/whereabouts
WORKDIR $GOPATH/src/github.com/dougbtv/whereabouts
COPY . .
RUN ./hack/build-go.sh

FROM arm64v8/alpine:latest
LABEL org.opencontainers.image.source https://github.com/k8snetworkplumbingwg/whereabouts
COPY --from=0 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts .
COPY script/install-cni.sh .
CMD ["/install-cni.sh"]
2 changes: 2 additions & 0 deletions Dockerfile.openshift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ENV CGO_ENABLED=1
ENV GO111MODULE=on
ENV VERSION=rhel8 COMMIT=unset
RUN go build -mod vendor -o bin/whereabouts cmd/whereabouts.go
RUN go build -mod vendor -o bin/ip-reconciler cmd/reconciler/*.go
WORKDIR /

FROM registry.ci.openshift.org/ocp/builder:rhel-7-golang-1.16-openshift-4.9 AS rhel7
Expand All @@ -24,6 +25,7 @@ RUN mkdir -p /usr/src/whereabouts/images && \
COPY --from=rhel7 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel7/bin
COPY --from=rhel8 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/bin
COPY --from=rhel8 /go/src/github.com/dougbtv/whereabouts/bin/whereabouts /usr/src/whereabouts/rhel8/bin
COPY --from=rhel8 /go/src/github.com/dougbtv/whereabouts/bin/ip-reconciler /ip-reconciler

LABEL io.k8s.display-name="Whereabouts CNI" \
io.k8s.description="This is a component of OpenShift Container Platform and provides a cluster-wide IPAM CNI plugin." \
Expand Down