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

[major] Vald V1 New Design APIs #740

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
14104cb
[minor] Vald V1 New Design APIs
Oct 3, 2020
0a13765
Merge branch 'master' into feature/all/new-design-apis
Oct 3, 2020
bf26fdb
[minor] Vald V1 New Design APIs
Oct 3, 2020
8f74ebe
Merge branch 'feature/all/new-design-apis' of https://github.com/vdaa…
Oct 4, 2020
6c4ba85
Apply suggestions from code review
Oct 5, 2020
6051bdd
Apply suggestions from code review
Oct 8, 2020
86491d3
Merge branch 'master' into feature/all/new-design-apis
Oct 8, 2020
c210926
:recycle: Use new design apis in load test (#762)
kmrmt Oct 13, 2020
969f198
change test assets for new design api (#741)
Oct 13, 2020
07fbb2a
:whale: fix Makefile.d/docker.mk (#775)
rinx Oct 14, 2020
4d0ef02
internal libraries changes for new design apis (#742)
Oct 14, 2020
1546907
Merge branch 'master' into feature/all/new-design-apis
Oct 14, 2020
1b8c918
add tests
Oct 14, 2020
7c60373
Feature/agent/new design apis (#783)
Oct 20, 2020
4474e55
Merge branch 'master' into feature/all/new-design-apis
Oct 20, 2020
0672fdb
fix
Oct 20, 2020
2bff07a
fix
Oct 20, 2020
6392aed
fix
Oct 20, 2020
2d9d9ca
ignore deepsource analysis on .pb.go and example code (#786)
kevindiu Oct 21, 2020
b2cc7c6
fix
Oct 22, 2020
56c11fa
Merge branch 'feature/all/new-design-apis' of https://github.com/vdaa…
Oct 22, 2020
189ec59
fix
Oct 22, 2020
85aa392
fix
Oct 22, 2020
adcc855
fix
Oct 22, 2020
6c63d7c
fix
Oct 22, 2020
5bc8f7e
fix
Oct 22, 2020
df2cca0
fix
Oct 22, 2020
70777c5
fix
Oct 22, 2020
f79362e
fix (#796)
kevindiu Oct 26, 2020
e95669a
Feature/backup compressor/remove meta data (#794)
Oct 26, 2020
ed8ca0a
fix internal/client & hack pakcage for V1 API (#803)
Nov 4, 2020
68b7e1c
fix
Nov 4, 2020
84da1c3
fix
Nov 4, 2020
3e44ffa
fix
Nov 4, 2020
2630191
fix
Nov 4, 2020
fc79ccb
fix
Nov 4, 2020
6dd1403
fix
Nov 5, 2020
0f3560d
fix
Nov 5, 2020
4451088
fix
Nov 5, 2020
235cb1f
fix
Nov 6, 2020
b655c0b
fix
Nov 6, 2020
a75b8cd
fix
Nov 10, 2020
284b468
fix
Nov 10, 2020
178bfa6
Merge branch 'master' into feature/all/new-design-apis
Nov 10, 2020
9317cd5
fix
Nov 10, 2020
64b8dfa
Merge branch 'feature/all/new-design-apis' of https://github.com/vdaa…
Nov 10, 2020
67d37aa
fix
Nov 10, 2020
9b3237e
Merge branch 'master' into feature/all/new-design-apis
Nov 10, 2020
7af3fe7
fix
Nov 10, 2020
8190cf3
fix
Nov 10, 2020
f67ba8c
fix
Nov 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
#
version = 1

exclude_patterns = [
"**/*.pb.go",
"example/**"
]

[[analyzers]]
name = "go"
enabled = true
Expand Down
44 changes: 40 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
area/agent/core:
- apis/proto/v1/agent/core/**/*
- apis/grpc/v1/agent/core/**/*
- apis/proto/agent/core/**/*
- apis/grpc/agent/core/**/*
- cmd/agent/core/**/*
- pkg/agent/core/**/*

area/agent/sidecar:
- apis/proto/v1/agent/sidecar/**/*
- apis/grpc/v1/agent/sidecar/**/*
- apis/proto/agent/sidecar/**/*
- apis/grpc/agent/sidecar/**/*
- cmd/agent/sidecar/**/*
- pkg/agent/sidecar/**/*

area/discoverer:
- apis/proto/v1/discoverer/**/*
- apis/grpc/v1/discoverer/**/*
- apis/proto/discoverer/**/*
- apis/grpc/discoverer/**/*
- cmd/discoverer/**/*
Expand All @@ -29,10 +35,40 @@ area/filter/ingress:
- pkg/filter/ingress/**/*

area/gateway:
- apis/proto/vald/**/*
- apis/grpc/vald/**/*
- cmd/gateway/**/*
- pkg/gateway/**/*
- apis/proto/v1/gateway/vald/**/*
- apis/grpc/v1/gateway/vald/**/*
- apis/proto/gateway/vald/**/*
- apis/grpc/gateway/vald/**/*
- cmd/gateway/vald/**/*
- pkg/gateway/vald/**/*

area/gateway/lb:
- apis/proto/v1/payload/**/*
- apis/proto/v1/vald/**/*
- apis/grpc/v1/vald/**/*
- cmd/gateway/lb/**/*
- pkg/gateway/lb/**/*

area/gateway/meta:
- apis/proto/v1/payload/**/*
- apis/proto/v1/vald/**/*
- apis/grpc/v1/vald/**/*
- cmd/gateway/meta/**/*
- pkg/gateway/meta/**/*

area/gateway/backup:
- apis/proto/v1/payload/**/*
- apis/proto/v1/vald/**/*
- apis/grpc/v1/vald/**/*
- cmd/gateway/backup/**/*
- pkg/gateway/backup/**/*

area/gateway/filter:
- apis/proto/v1/payload/**/*
- apis/proto/v1/vald/**/*
- apis/grpc/v1/vald/**/*
- cmd/gateway/filter/**/*
- pkg/gateway/filter/**/*

area/manager/backup:
- apis/proto/manager/backup/**/*
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/dockers-gateway-backup-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: "Build docker image: gateway-backup"
on:
push:
branches:
- master
tags:
- "*.*.*"
- "v*.*.*"
- "*.*.*-*"
- "v*.*.*-*"
paths:
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/gateway/backup/**"
- "cmd/gateway/backup/**"
- "pkg/gateway/internal/**"
- "dockers/base/Dockerfile"
- "dockers/gateway/backup/Dockerfile"
- "versions/GO_VERSION"
pull_request:
paths:
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/**/*_mock.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/gateway/backup/**"
- "cmd/gateway/backup/**"
- "pkg/gateway/internal/**"
- "dockers/base/Dockerfile"
- "dockers/gateway/backup/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
buildkitd-flags: "--debug"
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-vald-gateway-backup-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-vald-gateway-backup-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Image name
id: image_name
run: |
image_name=`make docker/name/gateway-backup`
base_platforms=`make docker/platforms`
echo "IMAGE_NAME=${image_name}" >> $GITHUB_ENV
echo "::set-output name=IMAGE_NAME::${image_name}"
echo "::set-output name=BASE_PLATFORMS::${base_platforms}"
- name: Determine tag name (master)
if: github.ref == 'refs/heads/master'
run: |
echo "PRIMARY_TAG=nightly" >> $GITHUB_ENV
echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV
env:
PLATFORMS: ${{ steps.image_name.outputs.BASE_PLATFORMS }}
- name: Determine tag name (pull request)
if: github.event_name == 'pull_request'
run: |
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"`
echo "PR-${pr_num}" > versions/VALD_VERSION
echo "PRIMARY_TAG=pr-${pr_num}" >> $GITHUB_ENV
echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV
env:
PLATFORMS: linux/amd64
- name: Determine tag name (tags)
if: startsWith( github.ref, 'refs/tags/')
id: determine_tag
run: |
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'`
echo "::set-output name=TAG_NAME::${tag_name}"
echo "PRIMARY_TAG=${tag_name}" >> $GITHUB_ENV
echo "PLATFORMS=${PLATFORMS}" >> $GITHUB_ENV
env:
PLATFORMS: ${{ steps.image_name.outputs.BASE_PLATFORMS }}
- name: Build and Push
run: |
make \
DOCKER="docker buildx" \
DOCKER_OPTS="--platform ${PLATFORMS} --builder ${BUILDER} ${CACHE_OPTS} ${LABEL_OPTS} --push" \
TAG="${PRIMARY_TAG}" \
docker/build/gateway-backup
make \
REPO="ghcr.io/vdaas/vald" \
DOCKER="docker buildx" \
DOCKER_OPTS="--platform ${PLATFORMS} --builder ${BUILDER} ${CACHE_OPTS} ${LABEL_OPTS} --push" \
TAG="${PRIMARY_TAG}" \
docker/build/gateway-backup
env:
DOCKER_BUILDKIT: 1
BUILDER: ${{ steps.buildx.outputs.name }}
CACHE_OPTS: "--cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,mode=max,dest=/tmp/.buildx-cache"
LABEL_OPTS: "--label org.opencontainers.image.url=${{ github.event.repository.html_url }} --label org.opencontainers.image.source=${{ github.event.repository.html_url }} --label org.opencontainers.image.revision=${{ github.sha }}"
- name: Initialize CodeQL
if: startsWith( github.ref, 'refs/tags/')
uses: github/codeql-action/init@v1
- name: Run vulnerability scanner (table)
if: startsWith( github.ref, 'refs/tags/')
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ steps.image_name.outputs.IMAGE_NAME }}:${{ steps.determine_tag.outputs.TAG_NAME }}"
format: "table"
- name: Run vulnerability scanner (sarif)
if: startsWith( github.ref, 'refs/tags/')
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ steps.image_name.outputs.IMAGE_NAME }}:${{ steps.determine_tag.outputs.TAG_NAME }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
- name: Upload Trivy scan results to Security tab
if: startsWith( github.ref, 'refs/tags/')
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: "trivy-results.sarif"
slack:
name: Slack notification
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/')
steps:
- uses: technote-space/workflow-conclusion-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: 8398a7/action-slack@v2
with:
author_name: vald-backup-gateway image build
status: ${{ env.WORKFLOW_CONCLUSION }}
only_mention_fail: channel
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NOTIFY_WEBHOOK_URL }}
Loading