Skip to content

Commit

Permalink
Merge branch 'main' into ci/workflow/e2e-job
Browse files Browse the repository at this point in the history
  • Loading branch information
hlts2 committed Dec 7, 2023
2 parents b1bf5e0 + dfdf8af commit 39ba6d2
Show file tree
Hide file tree
Showing 159 changed files with 10,126 additions and 4,299 deletions.
6 changes: 3 additions & 3 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.3
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
6 changes: 3 additions & 3 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.3
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5
6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

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

- Go Version: 1.21.3
- Go Version: 1.21.5
- Docker Version: 20.10.8
- Kubernetes Version: v1.28.2
- NGT Version: 2.1.3
- Kubernetes Version: v1.28.4
- NGT Version: 2.1.5

### Checklist:

Expand Down
12 changes: 4 additions & 8 deletions .github/actions/docker-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#
name: "Build Docker images"
description: "A action to build Docker images and publish them"

inputs:
target:
description: "Build target"
Expand Down Expand Up @@ -45,7 +44,6 @@ outputs:
EXTRA_TAGS:
description: "Extra tags"
value: ${{ steps.add_extra_tags.outputs.EXTRA_TAGS }}

runs:
using: "composite"
steps:
Expand All @@ -62,11 +60,9 @@ runs:
echo "ALTER_IMAGE_NAME=${alter_image_name}" >> $GITHUB_OUTPUT
env:
TARGET: ${{ inputs.target }}

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

- name: Determine platforms
shell: bash
id: determine_platforms
Expand All @@ -86,7 +82,6 @@ runs:
echo "PLATFORMS=${platforms}" >> $GITHUB_OUTPUT
env:
TARGET_PLATFORMS: ${{ inputs.platforms }}

- name: Add extra tags
shell: bash
id: add_extra_tags
Expand All @@ -102,14 +97,15 @@ runs:
IMAGE_NAME: ${{ steps.image_name.outputs.IMAGE_NAME }}
ALTER_IMAGE_NAME: ${{ steps.image_name.outputs.ALTER_IMAGE_NAME }}
PRIMARY_TAG: ${{ steps.determine_tag_name.outputs.PRIMARY_TAG }}

- name: Build and Push
shell: bash
id: build_and_push
run: |
make \
DOCKER="docker buildx" \
DOCKER_OPTS="--platform ${PLATFORMS} --builder ${BUILDER} ${LABEL_OPTS} ${EXTRA_TAGS} --push" \
REMOTE="true" \
DOCKER="docker" \
DOCKER_OPTS="--platform ${PLATFORMS} --builder ${BUILDER} ${LABEL_OPTS} --label org.opencontainers.image.version=${PRIMARY_TAG} --label org.opencontainers.image.title=${TARGET}" \
EXTRA_TAGS="${EXTRA_TAGS}" \
TAG="${PRIMARY_TAG}" \
docker/build/${TARGET}
env:
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/dockers-readreplica-rotate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#
# Copyright (C) 2019-2023 vdaas.org vald team <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: "Build docker image: readreplica-rotate"
on:
push:
branches:
- main
tags:
- "*.*.*"
- "v*.*.*"
- "*.*.*-*"
- "v*.*.*-*"
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/dockers-readreplica-rotate.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/index/job/readreplica/rotate/**"
- "cmd/index/job/readreplica/rotate/**"
- "dockers/index/job/readreplica/rotate/Dockerfile"
- "versions/GO_VERSION"
pull_request:
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/_docker-image.yaml"
- ".github/workflows/dockers-readreplica-rotate.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/index/job/readreplica/rotate/**"
- "cmd/index/job/readreplica/rotate/**"
- "dockers/index/job/readreplica/rotate/Dockerfile"
- "versions/GO_VERSION"
pull_request_target:
paths:
- ".github/actions/docker-build/actions.yaml"
- ".github/workflows/_docker-image.yaml"
- ".github/workflows/dockers-readreplica-rotate.yml"
- "go.mod"
- "go.sum"
- "internal/**"
- "!internal/**/*_test.go"
- "!internal/db/**"
- "!internal/k8s/**"
- "apis/grpc/**"
- "pkg/index/job/readreplica/rotate/**"
- "cmd/index/job/readreplica/rotate/**"
- "dockers/index/job/readreplica/rotate/Dockerfile"
- "versions/GO_VERSION"

jobs:
build:
uses: ./.github/workflows/_docker-image.yaml
with:
target: readreplica-rotate
secrets: inherit
114 changes: 114 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,119 @@
# CHANGELOG

## v1.7.9

### Docker images

<table>
<tr>
<th>component</th>
<th>Docker pull</th>
</tr>
<tr>
<td>Agent NGT</td>
<td>
<code>docker pull vdaas/vald-agent-ngt:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-agent-ngt:v1.7.9</code>
</td>
</tr>
<tr>
<td>Agent sidecar</td>
<td>
<code>docker pull vdaas/vald-agent-sidecar:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-agent-sidecar:v1.7.9</code>
</td>
</tr>
<tr>
<td>Discoverers</td>
<td>
<code>docker pull vdaas/vald-discoverer-k8s:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-discoverer-k8s:v1.7.9</code>
</td>
</tr>
<tr>
<td>Gateways</td>
<td>
<code>docker pull vdaas/vald-lb-gateway:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-lb-gateway:v1.7.9</code><br/>
<code>docker pull vdaas/vald-filter-gateway:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-filter-gateway:v1.7.9</code>
</td>
</tr>
<tr>
<td>Index Manager</td>
<td>
<code>docker pull vdaas/vald-manager-index:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-manager-index:v1.7.9</code>
</td>
</tr>
<tr>
<td>Helm Operator</td>
<td>
<code>docker pull vdaas/vald-helm-operator:v1.7.9</code><br/>
<code>docker pull ghcr.io/vdaas/vald/vald-helm-operator:v1.7.9</code>
</td>
</tr>
</table>

### Documents

- [GoDoc](https://pkg.go.dev/github.com/vdaas/[email protected])
- [Helm Chart Reference](https://github.com/vdaas/vald/blob/v1.7.9/charts/vald/README.md)
- [Helm Operator Chart Reference](https://github.com/vdaas/vald/blob/v1.7.9/charts/vald-helm-operator/README.md)

### Changes

:sparkles: New feature

- Add read replica rotator [#2241](https://github.com/vdaas/vald/pull/2241)
- Implement manifests for Index Management Job [#2235](https://github.com/vdaas/vald/pull/2235)
- Add job error to report index correction error status [#2231](https://github.com/vdaas/vald/pull/2231)
- Add implementation for save index job [#2227](https://github.com/vdaas/vald/pull/2227)
- Add implementation for create index job [#2223](https://github.com/vdaas/vald/pull/2223)
- Add index correction metrics [#2215](https://github.com/vdaas/vald/pull/2215)
- Add index correction document [#2217](https://github.com/vdaas/vald/pull/2217)
- Add make command to update template [#2212](https://github.com/vdaas/vald/pull/2212)
- Add job to check format difference [#2214](https://github.com/vdaas/vald/pull/2214)
- Add verification for index correction e2e and add clusterrole cronjobs for operator to deploy index correction [#2205](https://github.com/vdaas/vald/pull/2205)
- Add StreamListObject to LB [#2203](https://github.com/vdaas/vald/pull/2203)
- Add index correction helm templates and E2E [#2200](https://github.com/vdaas/vald/pull/2200)
- Add index correction internal logic [#2194](https://github.com/vdaas/vald/pull/2194)
- Add bbolt as internal/db/kvs [#2177](https://github.com/vdaas/vald/pull/2177)

:zap: Improve performance

- Improve index correction performance [#2234](https://github.com/vdaas/vald/pull/2234)

:recycle: Refactor

- Refactor Index Management Job [#2232](https://github.com/vdaas/vald/pull/2232)
- Fix invalid network policy schema [#2230](https://github.com/vdaas/vald/pull/2230)
- Add minikube to create volume snapshot development environment locally [#2228](https://github.com/vdaas/vald/pull/2228)
- Enable ingress resource in the get started document [#2211](https://github.com/vdaas/vald/pull/2211)
- Add step to get k3s latest version [#2206](https://github.com/vdaas/vald/pull/2206)
- Update telepresence and helm-docs installer and update deps [#2195](https://github.com/vdaas/vald/pull/2195)
- Replace x/slices with standard slices pkg [#2193](https://github.com/vdaas/vald/pull/2193)
- add benchmark and check program for core ngt [#2179](https://github.com/vdaas/vald/pull/2179)

:bug: Bugfix

- Revert vtpool for ResourceExhausted problem [#2255](https://github.com/vdaas/vald/pull/2255)
- Fix deleted contour ingress controller apply [#2229](https://github.com/vdaas/vald/pull/2229)

:pencil2: Document

- Add document for RemoveByTimestamp RPC [#2238](https://github.com/vdaas/vald/pull/2238)

:green_heart: CI

- Disable exhaustruct [#2240](https://github.com/vdaas/vald/pull/2240)
- Fix fails when there are format differences [#2226](https://github.com/vdaas/vald/pull/2226)

:arrow_up: Update dependencies

- update deps [#2208](https://github.com/vdaas/vald/pull/2208)
- update dependencies [#2260](https://github.com/vdaas/vald/pull/2260)

## v1.7.8

### Docker images
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GOPKG = github.com/$(ORG)/$(NAME)
DATETIME = $(eval DATETIME := $(shell date -u +%Y/%m/%d_%H:%M:%S%z))$(DATETIME)
TAG ?= latest
CRORG ?= $(ORG)
# CRORG = ghcr.io/vdaas/vald
GHCRORG = ghcr.io/$(ORG)/$(NAME)
AGENT_IMAGE = $(NAME)-agent-ngt
AGENT_SIDECAR_IMAGE = $(NAME)-agent-sidecar
CI_CONTAINER_IMAGE = $(NAME)-ci-container
Expand All @@ -33,6 +33,7 @@ LOADTEST_IMAGE = $(NAME)-loadtest
INDEX_CORRECTION_IMAGE = $(NAME)-index-correction
INDEX_CREATION_IMAGE = $(NAME)-index-creation
INDEX_SAVE_IMAGE = $(NAME)-index-save
READREPLICA_ROTATE_IMAGE = $(NAME)-readreplica-rotate
MANAGER_INDEX_IMAGE = $(NAME)-manager-index
MAINTAINER = "$(ORG).org $(NAME) team <$(NAME)@$(ORG).org>"

Expand Down
29 changes: 29 additions & 0 deletions Makefile.d/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,35 @@ cmd/index/job/save/index-save: \
$(dir $@)main.go
$@ -version

cmd/index/job/readreplica/rotate/readreplica-rotate: \
$(GO_SOURCES_INTERNAL) \
$(PBGOS) \
$(shell find $(ROOTDIR)/cmd/index/job/readreplica/rotate -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \
$(shell find $(ROOTDIR)/pkg/index/job/readreplica/rotate -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go')
$(eval CGO_ENABLED = 0)
CGO_ENABLED=$(CGO_ENABLED) \
GO111MODULE=on \
GOPRIVATE=$(GOPRIVATE) \
go build \
--ldflags "-w -extldflags=-static \
-X '$(GOPKG)/internal/info.Version=$(VERSION)' \
-X '$(GOPKG)/internal/info.GitCommit=$(GIT_COMMIT)' \
-X '$(GOPKG)/internal/info.BuildTime=$(DATETIME)' \
-X '$(GOPKG)/internal/info.GoVersion=$(GO_VERSION)' \
-X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \
-X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \
-X '$(GOPKG)/internal/info.CGOEnabled=$(CGO_ENABLED)' \
-X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \
-buildid=" \
-mod=readonly \
-modcacherw \
-a \
-tags "osusergo netgo static_build" \
-trimpath \
-o $@ \
$(dir $@)main.go
$@ -version

.PHONY: binary/build/zip
## build all binaries and zip them
binary/build/zip: \
Expand Down
Loading

0 comments on commit 39ba6d2

Please sign in to comment.