Skip to content

Commit

Permalink
refactor update opentelemetry-go & faiss
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Jan 23, 2024
1 parent 07570a1 commit 0c00dc2
Show file tree
Hide file tree
Showing 184 changed files with 9,713 additions and 1,784 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.5
- Go Version: 1.21.6
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- Kubernetes Version: v1.29.1
- NGT Version: 2.1.6
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.5
- Go Version: 1.21.6
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- Kubernetes Version: v1.29.1
- NGT Version: 2.1.6
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<!--- Please change the versions below along with your environment -->

- Go Version: 1.21.5
- Go Version: 1.21.6
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.4
- Kubernetes Version: v1.29.1
- NGT Version: 2.1.6

### Checklist:
Expand Down
8 changes: 2 additions & 6 deletions .github/actions/detect-docker-image-tags/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
name: "Detect Docker image tags"
description: "A action to detect Docker image tags"

inputs:
tag_name:
description: "Tag name to check whether exists or not"
Expand All @@ -24,18 +23,14 @@ inputs:
images:
description: "Image names"
required: false
default: "vdaas/vald-agent-ngt \
vdaas/vald-discoverer-k8s \
vdaas/vald-lb-gateway \
vdaas/vald-manager-index"
default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index"
outputs:
HELM_EXTRA_OPTIONS:
description: "Helm extra options that specifies image tags"
value: ${{ steps.specify_container_versions.outputs.HELM_EXTRA_OPTIONS }}
IMAGE_TAGS:
description: "Specifies image tags"
value: ${{ steps.specify_container_versions.outputs.IMAGE_TAGS }}

runs:
using: "composite"
steps:
Expand All @@ -45,6 +40,7 @@ runs:
run: |
declare -A m=(
["vdaas/vald-agent-ngt"]="agent.image.tag"
["vdaas/vald-agent-faiss"]="agent.image.tag"
["vdaas/vald-agent-sidecar"]="agent.sidecar.image.tag"
["vdaas/vald-discoverer-k8s"]="discoverer.image.tag"
["vdaas/vald-lb-gateway"]="gateway.lb.image.tag"
Expand Down
13 changes: 1 addition & 12 deletions .github/actions/setup-e2e/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
name: "Setup E2E environment"
description: "A action to set up the environment for executing E2E test"

inputs:
require_libhdf5:
description: "If libhdf5 is not required, set this to false"
Expand Down Expand Up @@ -44,8 +43,7 @@ inputs:
target_images:
description: "Image names"
required: false
default: "vdaas/vald-agent-ngt vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-manager-index"

default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index"
outputs:
HELM_EXTRA_OPTIONS:
description: "Helm extra options that specifies E2E target image tags"
Expand All @@ -56,7 +54,6 @@ outputs:
DEFAULT_IMAGE_TAG:
description: "Default E2E target image tag"
value: ${{ steps.determine_tag_name.outputs.DEFAULT_TAG }}

runs:
using: "composite"
steps:
Expand All @@ -66,45 +63,37 @@ runs:
run: |
sudo apt-get update
sudo apt-get install -y libhdf5-dev
- name: Setup Go environment
if: ${{ inputs.require_go == 'true' }}
uses: ./.github/actions/setup-go

- name: Setup Helm environment
if: ${{ inputs.require_helm == 'true' }}
uses: ./.github/actions/setup-helm

- name: Wait for target Docker images
if: startsWith( github.ref, 'refs/tags/')
uses: ./.github/actions/wait-for-docker-image
with:
images: ${{ inputs.target_images }}

- name: Determine Docker image tag
id: determine_tag_name
uses: ./.github/actions/determine-docker-image-tag

- name: Specify container versions
id: specify_container_versions
uses: ./.github/actions/detect-docker-image-tags
with:
tag_name: ${{ steps.determine_tag_name.outputs.PRIMARY_TAG }}
images: ${{ inputs.target_images }}

- uses: ./.github/actions/setup-k3d
if: ${{ inputs.require_k3d == 'true' }}
with:
agents: 3
ingress_port: ${{ inputs.ingress_port }}

- name: Setup Minikube environment
if: ${{ inputs.require_minikube == 'true' }}
shell: bash
run: |
make minikube/install
make minikube/start
- name: Check Kubernetes cluster
shell: bash
run: |
Expand Down
7 changes: 1 addition & 6 deletions .github/actions/wait-for-docker-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
#
name: "Wait for Docker Images"
description: "A action to wait for Docker images to be published"

inputs:
images:
description: "image names"
required: false
default: "vdaas/vald-agent-ngt \
vdaas/vald-discoverer-k8s \
vdaas/vald-lb-gateway \
vdaas/vald-manager-index"
default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index"
outputs: {}

runs:
using: "composite"
steps:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/_docker-image-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build the Docker image
id: build_image
run: |
Expand All @@ -48,7 +46,6 @@ jobs:
TARGET: ${{ inputs.target }}
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 }}"
PRIMARY_TAG: ${{ github.sha }}

- name: Scan the Docker image
uses: ./.github/actions/scan-docker-image
with:
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/_docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ on:
description: "If it is specified, specified platforms will be used."
required: false
default: ""

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref != 'refs/heads/main' && github.ref || github.sha }}-${{ github.event_name }}-${{ inputs.target }}
cancel-in-progress: true

jobs:
dump-contexts-to-log:
runs-on: ubuntu-latest
Expand All @@ -41,6 +39,8 @@ jobs:
runs-on: ubuntu-latest
if: >-
${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) ||
(github.event.pull_request.head.repo.fork == true && github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'push' && startsWith( github.ref, 'refs/heads/release/v')) ||
Expand All @@ -55,21 +55,17 @@ jobs:
else
echo ref=${{ github.sha }} >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v4
with:
ref: ${{ steps.ref.outputs.ref }}

- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:master
platforms: linux/amd64,linux/arm64

- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -80,13 +76,11 @@ jobs:
image=moby/buildkit:master
network=host
buildkitd-flags: "--debug --oci-worker-gc=false"

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -95,15 +89,13 @@ jobs:
# password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}

- name: Build and Publish
id: build_and_publish
uses: ./.github/actions/docker-build
with:
target: ${{ inputs.target }}
platforms: ${{ inputs.platforms }}
builder: ${{ steps.buildx.outputs.name }}

- name: Scan the Docker image
if: startsWith( github.ref, 'refs/tags/')
uses: ./.github/actions/scan-docker-image
Expand All @@ -115,7 +107,6 @@ jobs:
if: github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/notify-slack
with:
author_name: ${{ inputs.target }} image build
Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/dockers-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,72 +26,66 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context

agent-ngt:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: agent-ngt

agent-faiss:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: agent-faiss
agent-sidecar:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: agent-sidecar

ci-container:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: ci-container

dev-container:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: dev-container

discoverer-k8s:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: discoverer-k8s

gateway-lb:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: gateway-lb

gateway-mirror:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: gateway-mirror
gateway-filter:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: gateway-filter

index-correction:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: index-correction

index-creation:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: index-creation

index-save:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: index-save

loadtest:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: loadtest

manager-index:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: manager-index

operator-helm:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
target: operator/helm

readreplica-rotate:
uses: ./.github/workflows/_docker-image-scan.yaml
with:
Expand Down
Loading

0 comments on commit 0c00dc2

Please sign in to comment.