Skip to content

Commit

Permalink
Remove hack/netpol and associated Kind CI job (#4793)
Browse files Browse the repository at this point in the history
hack/netpol was always meant as a temporary placeholder, while new
Netpol tests were being contributed to upstream K8s. We have been
meaning to remove the folder for 2 years.

Note that the jenkins-networkpolicy CI job runs a recent version of K8s
e2e tests (1.25+), which includes the Netpol test suite. We could also
consider adding a new Kind CI job (as a Github workflow) dedicated to
running the upstream Netpol tests, but it is not strictly necessary and
could be an extra burden on our Github CI, as the tests take some time
to complete.

Fixes #1740

Signed-off-by: Antonin Bas <abas@vmware.com>
  • Loading branch information
antoninbas authored Apr 6, 2023
1 parent f749d86 commit 22f47d4
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 2,399 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,6 @@ jobs:
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push antrea/antrea-mc-controller:latest
build-netpol-tmp:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' || github.event_name == 'push' }}
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Build netpol Docker image
working-directory: hack/netpol
run: make build
- name: Push netpol Docker image to registry
if: ${{ github.repository == 'antrea-io/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
working-directory: hack/netpol
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
make push
make push-release
build-flow-aggregator:
needs: check-changes
if: ${{ needs.check-changes.outputs.has_changes == 'yes' || github.event_name == 'push' }}
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
# include all go.sum files (not just the root one), since we are also checking hack/netpol
cache-dependency-path: '**/go.sum'
- name: Run golangci-lint
run: make golangci
- name: Run golangci-lint for netpol
working-directory: hack/netpol
run: make golangci

golangci-lint-macos:
needs: check-changes
Expand All @@ -139,13 +134,8 @@ jobs:
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
# include all go.sum files (not just the root one), since we are also checking hack/netpol
cache-dependency-path: '**/go.sum'
- name: Run golangci-lint
run: make golangci
- name: Run golangci-lint for netpol
working-directory: hack/netpol
run: make golangci

bin:
needs: check-changes
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -595,40 +595,6 @@ jobs:
path: log.tar.gz
retention-days: 30

test-netpol-tmp:
name: Run experimental network policy tests (netpol) on Kind cluster
needs: build-antrea-coverage-image
runs-on: [ubuntu-latest]
steps:
- name: Free disk space
# https://github.com/actions/virtual-environments/issues/709
run: |
sudo apt-get clean
df -h
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Download Antrea image from previous job
uses: actions/download-artifact@v3
with:
name: antrea-ubuntu-cov
- name: Load Antrea image
run: |
docker load -i antrea-ubuntu.tar
docker tag antrea/antrea-ubuntu-coverage:latest antrea/antrea-ubuntu:latest
- name: Install Kind
run: |
curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-$(uname)-amd64
chmod +x ./kind
sudo mv kind /usr/local/bin
- name: Build netpol Docker image
working-directory: hack/netpol
run: make
- name: Run netpol tests
working-directory: hack/netpol
run: ./test-kind.sh

validate-prometheus-metrics-doc:
name: Validate metrics in Prometheus document match running deployment's
needs: build-antrea-coverage-image
Expand Down Expand Up @@ -675,7 +641,6 @@ jobs:
- test-upgrade-from-N-2
- test-compatible-N-1
- test-compatible-N-2
- test-netpol-tmp
- validate-prometheus-metrics-doc
- test-e2e-flow-visibility
runs-on: [ubuntu-latest]
Expand Down
1 change: 0 additions & 1 deletion hack/.markdownlint-ignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
CHANGELOG/
CHANGELOG.md
hack/netpol
CODE_OF_CONDUCT.md
# auto-generated file
build/charts/antrea/README.md
Expand Down
Empty file removed hack/netpol/.gitignore
Empty file.
14 changes: 0 additions & 14 deletions hack/netpol/.golangci.yml

This file was deleted.

23 changes: 0 additions & 23 deletions hack/netpol/Dockerfile

This file was deleted.

34 changes: 0 additions & 34 deletions hack/netpol/Makefile

This file was deleted.

115 changes: 0 additions & 115 deletions hack/netpol/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions hack/netpol/go.mod

This file was deleted.

Loading

0 comments on commit 22f47d4

Please sign in to comment.