forked from kube-vip/kube-vip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kube-vip:main' into master
- Loading branch information
Showing
155 changed files
with
14,905 additions
and
5,767 deletions.
There are no files selected for viewing
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,4 @@ | ||
# Enable GitHub funding | ||
|
||
github: [kube-vip] | ||
|
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,35 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Environment (please complete the following information):** | ||
- OS/Distro: [e.g. Ubuntu 1804] | ||
- Kubernetes Version: [e.g. v.1.18] | ||
- Kube-vip Version: [e.g. 0.2.3] | ||
|
||
**`Kube-vip.yaml`:** | ||
If Possible add in your kube-vip manifest (please remove anything that is confidential) | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
- package-ecosystem: docker | ||
directory: / | ||
schedule: | ||
interval: weekly |
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,31 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow checks out code, builds an image, performs a container image | ||
# scan with Anchore's Syft tool, and uploads the results to the GitHub Dependency | ||
# submission API. | ||
|
||
# For more information on the Anchore sbom-action usage | ||
# and parameters, see https://github.com/anchore/sbom-action. For more | ||
# information about the Anchore SBOM tool, Syft, see | ||
# https://github.com/anchore/syft | ||
name: Anchore Syft SBOM scan | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
sbom: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref_name }} | ||
- name: Anchore SBOM Action | ||
uses: anchore/[email protected] | ||
with: | ||
format: cyclonedx-json |
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,97 @@ | ||
name: For each commit and PR | ||
on: | ||
push: | ||
pull_request: | ||
env: | ||
GO_VERSION: "1.21" | ||
jobs: | ||
validation: | ||
runs-on: ubuntu-latest | ||
name: Checks and linters | ||
steps: | ||
- name: Init | ||
run: sudo apt-get update && sudo apt-get install -y build-essential golint && sudo sysctl fs.inotify.max_user_instances=8192 && sudo sysctl fs.inotify.max_user_watches=524288 | ||
- name: Install golangci-lint | ||
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: All checks | ||
run: make check | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
name: Unit tests | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run tests | ||
run: make unit-tests | ||
integration-tests: | ||
name: Integration tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Run tests | ||
run: make integration-tests | ||
e2e-tests: | ||
runs-on: ubuntu-latest | ||
name: E2E ARP tests | ||
steps: | ||
- name: Ensure fs wont cause issues | ||
run: sudo sysctl fs.inotify.max_user_instances=8192 && sudo sysctl fs.inotify.max_user_watches=524288 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build image locally | ||
run: make dockerx86Local | ||
- name: Run Control plane tests | ||
run: make e2e-tests | ||
- name: Run Control plane tests v1.29.0 onwards | ||
run: make e2e-tests129 | ||
service-e2e-tests: | ||
runs-on: ubuntu-latest | ||
name: E2E service tests | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build image with iptables | ||
run: make dockerx86ActionIPTables | ||
- name: Run tests | ||
run: DOCKERTAG=action make service-tests | ||
image-vul-check: | ||
runs-on: ubuntu-latest | ||
name: Image vulnerability scan | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Build image with iptables | ||
run: make dockerx86ActionIPTables | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: 'plndr/kube-vip:action' | ||
format: 'table' | ||
exit-code: '1' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
|
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,75 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '17 10 * * 6' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,52 @@ | ||
name: Build and publish main image regularly | ||
|
||
on: | ||
schedule: | ||
- cron: '25 0 * * *' | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
nightly_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to Github Packages | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build standard version | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: >- | ||
plndr/kube-vip:${{ github.ref_name }}, | ||
ghcr.io/kube-vip/kube-vip:${{ github.ref_name }} | ||
- name: Build iptables version | ||
id: docker_build_iptables | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile_iptables | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: >- | ||
plndr/kube-vip-iptables:${{ github.ref_name }}, | ||
ghcr.io/kube-vip/kube-vip-iptables:${{ github.ref_name }} | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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,56 @@ | ||
name: Publish Releases to Docker Hub and GitHub Container Registry | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Login to Github Packages | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push main branch | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: >- | ||
plndr/kube-vip:${{ github.ref_name }}, | ||
plndr/kube-vip:latest, | ||
ghcr.io/kube-vip/kube-vip:${{ github.ref_name }}, | ||
ghcr.io/kube-vip/kube-vip:latest | ||
- name: Build iptables version and push main branch | ||
id: docker_build_iptables | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: Dockerfile_iptables | ||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: >- | ||
plndr/kube-vip-iptables:${{ github.ref_name }}, | ||
plndr/kube-vip-iptables:latest, | ||
ghcr.io/kube-vip/kube-vip-iptables:${{ github.ref_name }}, | ||
ghcr.io/kube-vip/kube-vip-iptables:latest | ||
- name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
Oops, something went wrong.