forked from antrea-io/antrea-ui
-
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.
The UI consists of a Golang backend (to server APIs) and a React TypeScript frontend. The only supported installation method for the Antrea UI is with Helm. Until the first release (v0.1.0), installation will require cloning the repository to access the chart. See antrea-io/antrea#4640 Signed-off-by: Antonin Bas <[email protected]>
- Loading branch information
1 parent
3cb00ce
commit 77692fa
Showing
124 changed files
with
17,332 additions
and
0 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,9 @@ | ||
# editor and IDE paraphernalia | ||
**/.idea | ||
**/*.swp | ||
**/*.swo | ||
**/*~ | ||
|
||
**/.DS_Store | ||
|
||
**/node_modules |
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,25 @@ | ||
name: Build and push container images | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Build container images | ||
run: make | ||
- name: Push container images if needed | ||
if: ${{ github.repository == 'antrea-io/antrea-ui' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
run: | | ||
docker push antrea/antrea-ui-frontend | ||
docker push antrea/antrea-ui-backend |
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,37 @@ | ||
name: Build and push container images for release | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
get-version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.get-version.outputs.version }} | ||
steps: | ||
- name: Extract version from Github ref | ||
id: get-version | ||
env: | ||
TAG: ${{ github.ref }} | ||
run: | | ||
version=${TAG:10} | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: get-version | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Build container images | ||
run: make | ||
- name: Push container images if needed | ||
if: ${{ github.repository == 'antrea-io/antrea-ui' && github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
env: | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
VERSION: ${{ needs.get-version.outputs.version }} | ||
run: | | ||
docker push antrea/antrea-ui-frontend:"${VERSION}" | ||
docker push antrea/antrea-ui-backend:"${VERSION}" |
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,22 @@ | ||
name: Documentation | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
verify: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checking whether autogenerated Helm chart documentation is up-to-date | ||
working-directory: build/charts/ | ||
run: | | ||
make helm-docs | ||
DIFF=$(git diff .) | ||
if [ -n "$DIFF" ]; then | ||
echo "The Helm chart documentation is out-of-date; please run 'make helm-docs' in 'build/charts/' and commit the changes" | ||
exit 1 | ||
fi |
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,47 @@ | ||
name: Go | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go using version from go.mod | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Run unit tests | ||
run: | | ||
make test | ||
tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Go using version from go.mod | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Check tidiness | ||
run: | | ||
go mod tidy | ||
test -z "$(git status --porcelain)" || (echo "you should run 'go mod tidy' and commit the changes"; exit 1) | ||
make generate | ||
test -z "$(git status --porcelain)" || (echo "you should run 'make generate' and commit the changes"; exit 1) | ||
golangci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Run code linters | ||
run: | | ||
make golangci |
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,21 @@ | ||
name: Node | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
yarn: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check-out code | ||
uses: actions/checkout@v3 | ||
- name: Set up Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 19 | ||
- run: yarn install | ||
- run: yarn lint |
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,28 @@ | ||
name: Process new release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
upload-release-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go using version from go.mod | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version-file: 'go.mod' | ||
- name: Build assets | ||
env: | ||
TAG: ${{ github.ref }} | ||
PRERELEASE: ${{ github.event.release.prerelease }} | ||
run: | | ||
mkdir assets | ||
VERSION="${TAG:10}" ./hack/release/prepare-assets.sh ./assets | ||
- name: Upload all assets | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
asset_paths: '["./assets/*"]' |
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,40 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
bin | ||
testbin/* | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Kubernetes Generated files - skip generated files, except for vendored files | ||
|
||
!vendor/**/zz_generated.* | ||
|
||
# editor and IDE paraphernalia | ||
.idea | ||
*.swp | ||
*.swo | ||
*~ | ||
|
||
.DS_Store | ||
|
||
.golangci-bin | ||
|
||
creds/ | ||
|
||
__pycache__/ | ||
|
||
*.bak | ||
*.bkp | ||
|
||
*.pem | ||
|
||
.mockgen-bin | ||
.golangci-bin |
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,34 @@ | ||
# golangci-lint configuration used for CI | ||
run: | ||
tests: true | ||
timeout: 10m | ||
skip-files: | ||
- ".*\\.pb\\.go" | ||
skip-dirs-use-default: true | ||
|
||
linters-settings: | ||
goimports: | ||
local-prefixes: antrea.io/antrea-ui | ||
revive: | ||
ignore-generated-header: false | ||
severity: warning | ||
confidence: 0.8 | ||
rules: | ||
- name: unreachable-code | ||
- name: errorf | ||
- name: range | ||
- name: superfluous-else | ||
- name: var-declaration | ||
- name: duplicated-imports | ||
|
||
linters: | ||
disable-all: true | ||
enable: | ||
- misspell | ||
- gofmt | ||
- unused | ||
- staticcheck | ||
- gosec | ||
- goimports | ||
- vet | ||
- revive |
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,3 @@ | ||
# Community Code of Conduct | ||
|
||
Project Antrea follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). |
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,57 @@ | ||
# Developer Guide | ||
|
||
Thank you for taking the time out to contribute to project Antrea! | ||
|
||
## Contribute | ||
|
||
### Inclusive Naming | ||
|
||
For symbol names and documentation, do not introduce new usage of harmful | ||
language such as 'master / slave' (or 'slave' independent of 'master') and | ||
'blacklist / whitelist'. For more information about what constitutes harmful | ||
language and for a reference word replacement list, please refer to the | ||
[Inclusive Naming Initiative](https://inclusivenaming.org/). | ||
|
||
We are committed to removing all harmful language from the project. If you | ||
detect existing usage of harmful language in code or documentation, please | ||
report the issue to us or open a Pull Request to address it directly. Thanks! | ||
|
||
### Sign-off Your Work | ||
|
||
As a CNCF project, Antrea must enforce the [Developer Certificate of | ||
Origin](https://developercertificate.org/) (DCO) on all Pull Requests. We | ||
require that for all commits constituting the Pull Request, the commit message | ||
contains the `Signed-off-by` line with an email address that matches the commit | ||
author. By adding this line to their commit messages, contributors *sign-off* | ||
that they adhere to the requirements of the DCO. | ||
|
||
Git provides the `-s` command-line option to append the required line | ||
automatically to the commit message: | ||
|
||
```bash | ||
git commit -s -m 'This is my commit message' | ||
``` | ||
|
||
For an existing commit, you can also use this option with `--amend`: | ||
|
||
```bash | ||
git commit -s --amend | ||
``` | ||
|
||
If more than one person works on something it's possible for more than one | ||
person to sign-off on it. For example: | ||
|
||
```bash | ||
Signed-off-by: Some Developer [email protected] | ||
Signed-off-by: Another Developer [email protected] | ||
``` | ||
|
||
We use the [DCO Github App](https://github.com/apps/dco) to enforce that all | ||
commits in a Pull Request include the required `Signed-off-by` line. If this is | ||
not the case, the app will report a failed status for the Pull Request and it | ||
will be blocked from being merged. | ||
|
||
Compared to our earlier CLA, DCO tends to make the experience simpler for new | ||
contributors. If you are contributing as an employee, there is no need for your | ||
employer to sign anything; the DCO assumes you are authorized to submit | ||
contributions (it's your responsibility to check with your employer). |
Oops, something went wrong.