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

WIP [patch] divide gateway #425

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
28 changes: 26 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,32 @@ area/filter/ingress:
area/gateway:
- apis/proto/vald/**/*
- apis/grpc/vald/**/*
- cmd/gateway/**/*
- pkg/gateway/**/*
- cmd/gateway/vald/**/*
- pkg/gateway/vald/**/*

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

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

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

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

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Build the Docker image
run: |
echo 'Build docker image'
make docker/build/gateway-backup
- name: login to DockerHub
run: |
echo 'Login to DockerHub'
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
- name: push to DockerHub (master)
if: github.ref == 'refs/heads/master'
run: |
echo 'Push to DockerHub (master)'
imagename=`make docker/name/gateway-backup`
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
- name: push to DockerHub (pull request)
if: github.event_name == 'pull_request'
run: |
echo 'Push to DockerHub (pull request)'
imagename=`make docker/name/gateway-backup`
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"`
docker tag ${imagename} ${imagename}:pr-${pr_num}
docker push ${imagename}:pr-${pr_num}
- name: push to DockerHub (tags)
if: startsWith( github.ref, 'refs/tags/')
run: |
echo 'Push to DockerHub (tags)'
imagename=`make docker/name/gateway-backup`
docker push ${imagename}:latest
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'`
docker tag ${imagename} ${imagename}:${tag_name}
docker push ${imagename}:${tag_name}
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
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: 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 }}
93 changes: 93 additions & 0 deletions .github/workflows/dockers-gateway-filter-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: 'Build docker image: gateway-filter'
on:
push:
branches:
- master
tags:
- '*.*.*'
- 'v*.*.*'
- '*.*.*-*'
- 'v*.*.*-*'
paths:
- 'internal/**'
- '!internal/db/**'
- '!internal/k8s/**'
- 'apis/grpc/**'
- 'pkg/gateway/filter/**'
- 'cmd/gateway/filter/**'
- 'dockers/base/Dockerfile'
- 'dockers/gateway/filter/Dockerfile'
- 'versions/GO_VERSION'
pull_request:
paths:
- 'internal/**'
- '!internal/db/**'
- '!internal/k8s/**'
- 'apis/grpc/**'
- 'pkg/gateway/filter/**'
- 'cmd/gateway/filter/**'
- 'dockers/base/Dockerfile'
- 'dockers/gateway/filter/Dockerfile'
- 'versions/GO_VERSION'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Build the Docker image
run: |
echo 'Build docker image'
make docker/build/gateway-filter
- name: login to DockerHub
run: |
echo 'Login to DockerHub'
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
- name: push to DockerHub (master)
if: github.ref == 'refs/heads/master'
run: |
echo 'Push to DockerHub (master)'
imagename=`make docker/name/gateway-filter`
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
- name: push to DockerHub (pull request)
if: github.event_name == 'pull_request'
run: |
echo 'Push to DockerHub (pull request)'
imagename=`make docker/name/gateway-filter`
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"`
docker tag ${imagename} ${imagename}:pr-${pr_num}
docker push ${imagename}:pr-${pr_num}
- name: push to DockerHub (tags)
if: startsWith( github.ref, 'refs/tags/')
run: |
echo 'Push to DockerHub (tags)'
imagename=`make docker/name/gateway-filter`
docker push ${imagename}:latest
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'`
docker tag ${imagename} ${imagename}:${tag_name}
docker push ${imagename}:${tag_name}
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
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: filter-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 }}
93 changes: 93 additions & 0 deletions .github/workflows/dockers-gateway-lb-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: 'Build docker image: gateway-lb'
on:
push:
branches:
- master
tags:
- '*.*.*'
- 'v*.*.*'
- '*.*.*-*'
- 'v*.*.*-*'
paths:
- 'internal/**'
- '!internal/db/**'
- '!internal/k8s/**'
- 'apis/grpc/**'
- 'pkg/gateway/lb/**'
- 'cmd/gateway/lb/**'
- 'dockers/base/Dockerfile'
- 'dockers/gateway/lb/Dockerfile'
- 'versions/GO_VERSION'
pull_request:
paths:
- 'internal/**'
- '!internal/db/**'
- '!internal/k8s/**'
- 'apis/grpc/**'
- 'pkg/gateway/lb/**'
- 'cmd/gateway/lb/**'
- 'dockers/base/Dockerfile'
- 'dockers/gateway/lb/Dockerfile'
- 'versions/GO_VERSION'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Build the Docker image
run: |
echo 'Build docker image'
make docker/build/gateway-lb
- name: login to DockerHub
run: |
echo 'Login to DockerHub'
echo ${DOCKERHUB_PASS} | docker login --username ${DOCKERHUB_USER} --password-stdin
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
- name: push to DockerHub (master)
if: github.ref == 'refs/heads/master'
run: |
echo 'Push to DockerHub (master)'
imagename=`make docker/name/gateway-lb`
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
- name: push to DockerHub (pull request)
if: github.event_name == 'pull_request'
run: |
echo 'Push to DockerHub (pull request)'
imagename=`make docker/name/gateway-lb`
pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"`
docker tag ${imagename} ${imagename}:pr-${pr_num}
docker push ${imagename}:pr-${pr_num}
- name: push to DockerHub (tags)
if: startsWith( github.ref, 'refs/tags/')
run: |
echo 'Push to DockerHub (tags)'
imagename=`make docker/name/gateway-lb`
docker push ${imagename}:latest
tag_name=`echo $GITHUB_REF | sed -e 's:^refs/tags/::'`
docker tag ${imagename} ${imagename}:${tag_name}
docker push ${imagename}:${tag_name}
docker tag ${imagename} ${imagename}:nightly
docker push ${imagename}:nightly
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: lb-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