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

[DO NOT MERGE]: Investigate k3d problem #2315

Closed
Closed
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .devcontainer/postAttachCommand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
:

#
# This script is executed as postAttachCommand in devcontainer.json
# This script does...
# - create symbolic link of config.yaml for easier development
# - add command history setting to .zshrc to persist history
#

echo "creating symbolic link of config..."

LINK_TARGET="$(pwd)/cmd/agent/core/ngt/sample.yaml"
Expand Down
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
3 changes: 0 additions & 3 deletions .github/actions/determine-docker-image-tag/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
#
name: "Determine Docker image tag"
description: "A action to determine Docker image tag"

outputs:
PRIMARY_TAG:
description: "Primary tag"
value: ${{ steps.determine_tag_name.outputs.PRIMARY_TAG }}
DEFAULT_TAG:
description: "default tag. Tag to be used if the primary tag does not exist"
value: ${{ steps.determine_tag_name.outputs.DEFAULT_TAG }}

runs:
using: "composite"
steps:
Expand All @@ -35,7 +33,6 @@ runs:
echo "GITHUB_EVENT_PATH $GITHUB_EVENT_PATH"
echo "GITHUB_EVENT_NAME ${{ github.event_name }}"
echo "GITHUB_EVENT_NUMBER ${{ github.event.number }}"

- name: Determine tag name
shell: bash
id: determine_tag_name
Expand Down
5 changes: 1 addition & 4 deletions .github/actions/notify-slack/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
name: "Notify Slack"
description: "A action to notify Slack"

inputs:
author_name:
description: "User name for slack notification"
Expand All @@ -30,14 +29,12 @@ inputs:
status:
description: "Specify success or failure or cancelled or custom"
required: false

runs:
using: "composite"
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: technote-space/workflow-conclusion-action@v3
with:
GITHUB_TOKEN: ${{ inputs.token }}

- uses: 8398a7/action-slack@v3
with:
author_name: ${{ inputs.author_name }}
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
6 changes: 1 addition & 5 deletions .github/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
#
name: "Setup Go environment"
description: "A action to set up Go environment"

inputs:
go_version:
description: "The Go version to use. The default version is `versions/GO_VERSION`"
required: false
default: ""

runs:
using: "composite"
steps:
Expand All @@ -34,11 +32,9 @@ runs:
echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT
env:
GO_VERSION: ${{ inputs.go_version }}

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: ${{ steps.go_version.outputs.version }}

- name: Check Go version
shell: bash
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/actions/setup-k3d/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
name: "Setup k3d environment"
description: "A action to set up k3d (k3s in Docker)"

inputs:
version:
description: "k3d version"
Expand All @@ -41,7 +40,6 @@ inputs:
description: "Options for k3d cluster create command"
required: false
default: ""

runs:
using: "composite"
steps:
Expand All @@ -55,7 +53,6 @@ runs:
echo "tag=${TAG}" >> $GITHUB_OUTPUT
env:
K3D_VERSION: ${{ inputs.version }}

- name: Detect k3s version
id: k3s_version
shell: bash
Expand All @@ -65,19 +62,16 @@ runs:
echo "tag=${K3S_VERSION=$}" >> $GITHUB_OUTPUT
env:
K3S_VERSION: ${{ inputs.k3s_version }}

- name: Install k3d
shell: bash
run: |
curl -s ${REPO_URL} | ${{ steps.k3d_version.outputs.tag }} bash
env:
REPO_URL: "https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh"

- name: Check k3d version
shell: bash
run: |
k3d version

- name: Setup k3d options
shell: bash
id: k3d_options
Expand All @@ -95,8 +89,13 @@ runs:
INGRESS_PORT: ${{ inputs.ingress_port }}
OPTIONS: ${{ inputs.options }}
K3S_VERSION: ${{ steps.k3s_version.outputs.tag }}

- name: Create k8s cluster
shell: bash
id: start_k3d
run: |
k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }} --network bridge
- name: Ready k8s cluster
shell: bash
run: |
k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }}
k3d cluster list
kubectl cluster-info dump
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
1 change: 0 additions & 1 deletion .github/codeql/codeql-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
name: "Go CodeQL config"
queries:
- uses: security-and-quality
# - uses: github/codeql-go/ql/[email protected]
Loading
Loading