Skip to content

Commit

Permalink
Merge branch 'main' into fix/mirror/delete-mirror-register
Browse files Browse the repository at this point in the history
  • Loading branch information
hlts2 committed Feb 20, 2024
2 parents 7caa1d5 + f080436 commit e6b96f2
Show file tree
Hide file tree
Showing 54 changed files with 531 additions and 153 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/_release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,19 @@ jobs:
sed -i -r "s/^(\s*)tag\s*:\s*v[0-9]+\.[0-9]+\.[0-9]+\s*$/\1tag: ${RELEASE_TAG}/" charts/vald/values.yaml
sed -i -e "s/^version: .*$/version: ${RELEASE_TAG}/" charts/vald-helm-operator/Chart.yaml
sed -i -r "s/^(\s*)tag\s*:\s*v[0-9]+\.[0-9]+\.[0-9]+\s*$/\1tag: ${RELEASE_TAG}/" charts/vald-helm-operator/values.yaml
sed -i -e "s/^version: .*$/version: ${RELEASE_TAG}/" charts/vald-readreplica/Chart.yaml
sed -i -e "s/^version: .*$/version: ${RELEASE_TAG}/" charts/vald-benchmark-operator/Chart.yaml
sed -i -r "s/^(\s*)tag\s*:\s*v[0-9]+\.[0-9]+\.[0-9]+\s*$/\1tag: ${RELEASE_TAG}/" charts/vald-benchmark-operator/values.yaml
make helm/schema/all
make helm/schema/crd/all
make k8s/manifest/update
make k8s/manifest/helm-operator/update
make k8s/manifest/benchmark-operator/update
make k8s/manifest/readreplica/update
make helm/docs/vald
make helm/docs/vald-helm-operator
make helm/docs/vald-benchmark-operator
make helm/docs/vald-readreplica
BODY=""
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,25 @@ jobs:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Get PR title and body
id: pr_info
- name: Set context
id: set_context
run: |
echo "PR_TITLE=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
echo "PR_BODY=$(jq --raw-output .pull_request.body $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
LABEL_NAMES=`cat ${GITHUB_EVENT_PATH} | jq -r --arg PREFIX $TARGET_LABEL_NAME_PREFIX '[.pull_request.labels[]? | select(.name | startswith($PREFIX)) | .name] | join(" ")'`
echo "LABEL_NAMES=${LABEL_NAMES}" >> $GITHUB_OUTPUT # e.g.) actions/backport/v1.7 actions/backport/v1.8
echo "${LABEL_NAMES}"
- name: Create PR
if: ${{ github.event.pull_request.labels.*.name == '${TARGET_LABEL_NAME_PREFIX}*' }}
if: ${{ steps.set_context.outputs.LABEL_NAMES != '' }}
env:
PR_TITLE: ${{ steps.pr_info.outputs.PR_TITEL }}
PR_BODY: ${{ steps.pr_info.outputs.PR_BODY }}
LABEL_NAMES: ${{ steps.set_context.outputs.LABEL_NAMES }}
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
run: |
LABEL_NAMES=`echo "${{ github.event.pull_request.labels.*.name }}" | jq -r '[.[] | select(startswith("actions/backport/"))] | join(" ")'`
PR_TITLE=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.title"`
PR_BODY=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.body"`
PR_NUM=`cat $GITHUB_EVENT_PATH | jq -r ".pull_request.number"`
echo "${PR_NUM} ${PR_TITLE}: ${PR_BODY}"
for LABEL_NAME in ${LABEL_NAMES}; do
BRANCH_NAME=`echo "${LABEL_NAME}" | sed -e "s:^${TARGET_LABEL_NAME_PREFIX}::"` # e.g) release/vx.x, main
BACKPORT_BRANCH_NAME="${BACKPORT_BRANCH_NAME_PREFIX}/${BRANCH_NAME}/${GITHUB_HEAD_REF}" # e.g) backport/release/vx.x/{current branch name}
Expand All @@ -74,6 +79,6 @@ jobs:
git push origin ${BACKPORT_BRANCH_NAME}
gh pr create --base ${BRANCH_NAME} \
--title "Backport to ${BRANCH_NAME} for ${PR_TITLE}" \
--title "Backport PR #${PR_NUM} to ${BRANCH_NAME} for ${PR_TITLE}" \
--body "${PR_BODY}"
done
2 changes: 2 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ jobs:
run: |
make helm/package/vald
make helm/package/vald-helm-operator
make helm/package/vald-benchmark-operator
make helm/package/vald-readreplica
- name: Push to gh-pages
run: |
git checkout .
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,11 @@ update: \
## format go codes
format: \
license \
format/proto \
format/go \
format/json \
format/md \
format/yaml \
format/proto
format/yaml

.PHONY: format/go
## run golines, gofumpt, goimports for all go files
Expand Down
25 changes: 20 additions & 5 deletions Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ define gen-license
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/license/gen/main.go; \
go build -modcacherw \
-mod=readonly \
-a \
-tags "osusergo netgo static_build" \
-trimpath \
-o $$BIN_PATH $(ROOTDIR)/hack/license/gen/main.go; \
$$BIN_PATH $1; \
rm -rf $$BIN_PATH
endef
Expand All @@ -296,7 +301,12 @@ define gen-vald-helm-schema
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/gen/main.go; \
go build -modcacherw \
-mod=readonly \
-a \
-tags "osusergo netgo static_build" \
-trimpath \
-o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/gen/main.go; \
$$BIN_PATH charts/$1.yaml > charts/$1.schema.json; \
rm -rf $$BIN_PATH
endef
Expand All @@ -308,9 +318,14 @@ define gen-vald-crd
BIN_PATH="$(TEMP_DIR)/vald-helm-crd-schema-gen"; \
rm -rf $$BIN_PATH; \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
go build -mod=readonly -a -o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/crd/main.go; \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
go build -modcacherw \
-mod=readonly \
-a \
-tags "osusergo netgo static_build" \
-trimpath \
-o $$BIN_PATH $(ROOTDIR)/hack/helm/schema/crd/main.go; \
$$BIN_PATH $(ROOTDIR)/charts/$3.yaml > $(TEMP_DIR)/$2-spec.yaml; \
rm -rf $$BIN_PATH; \
$(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \
Expand Down
23 changes: 22 additions & 1 deletion Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ helm/package/vald-helm-operator: \
helm/schema/crd/vald-helm-operator
helm package charts/vald-helm-operator

.PHONY: helm/package/vald-benchmark-operator
## packaging Helm chart for vald-helm-operator
helm/package/vald-benchmark-operator: \
helm/schema/crd/vald-benchmark-job \
helm/schema/crd/vald-benchmark-scenario \
helm/schema/crd/vald-benchmark-operator
helm package charts/vald-benchmark-operator

.PHONY: helm/package/vald-readreplica
helm/package/vald-readreplica:
helm package charts/vald-readreplica

.PHONY: helm/repo/add
## add Helm chart repository
helm/repo/add:
Expand Down Expand Up @@ -73,6 +85,15 @@ charts/vald-helm-operator/README.md: \
.PHONY: helm/docs/vald-readreplica
helm/docs/vald-readreplica: charts/vald-readreplica/README.md

.PHONY: helm/docs/vald-benchmark-operator
helm/docs/vald-benchmark-operator: charts/vald-benchmark-operator/README.md

.PHONY: charts/vald-benchmark-operator/README.md
charts/vald-benchmark-operator/README.md: \
charts/vald-benchmark-operator/README.md.gotmpl \
charts/vald-benchmark-operator/values.yaml
helm-docs

# force to rebuild
.PHONY: charts/vald-readreplica/README.md
charts/vald-readreplica/README.md: \
Expand Down Expand Up @@ -142,8 +163,8 @@ $(BINDIR)/yq:
helm/schema/crd/all: \
helm/schema/crd/vald \
helm/schema/crd/vald-helm-operator \
helm/schema/crd/vald-benchmark-job \
helm/schema/crd/vald/mirror-target \
helm/schema/crd/vald-benchmark-job \
helm/schema/crd/vald-benchmark-scenario \
helm/schema/crd/vald-benchmark-operator

Expand Down
16 changes: 16 additions & 0 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ k8s/manifest/benchmark-operator/update: \
rm -rf $(TEMP_DIR)
cp -r charts/vald-benchmark-operator/crds k8s/tools/benchmark/operator/crds

.PHONY: k8s/manifest/readreplica/clean
## clean k8s manifests for readreplica
k8s/manifest/readreplica/clean:
rm -rf \
k8s/readreplica

.PHONY: k8s/manifest/readreplica/update
## update k8s manifests for readreplica using helm templates
k8s/manifest/readreplica/update: \
k8s/manifest/readreplica/clean
helm template \
--output-dir $(TEMP_DIR) \
charts/vald-readreplica
mv $(TEMP_DIR)/vald-readreplica/templates k8s/readreplica
rm -rf $(TEMP_DIR)

.PHONY: k8s/vald/deploy
## deploy vald sample cluster to k8s
k8s/vald/deploy:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald-benchmark-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ appVersion: "1.16.0"

apiVersion: v2
name: vald-benchmark-operator
version: v1.7.5
version: v1.7.11
description: A benchmark operator for benchmarking the Vald cluster.
type: application
keywords:
Expand Down
35 changes: 16 additions & 19 deletions charts/vald-benchmark-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
# vald-benchmark-operator
# Vald Benchmark Operator

![Version: v1.7.5](https://img.shields.io/badge/Version-v1.7.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
This is a Helm chart to install `vald-benchmark-operator`.

A benchmark operator for benchmarking the Vald cluster.
Current chart version is `v1.7.11`

**Homepage:** <https://vald.vdaas.org>
## Table of Contents

## Maintainers
- [Install](#install)
- [Configuration](#configuration)

| Name | Email | Url |
| -------- | -------------------- | --- |
| kpango | <kpango@vdaas.org> | |
| vankichi | <vankichi@vdaas.org> | |
| kmrmt | <ksk@vdaas.org> | |
## Install

## Source Code
Add Vald Helm repository

- <https://github.com/vdaas/vald>
$ helm repo add vald https://vald.vdaas.org/charts

## Values
Run the following command to install the chart,

$ helm install vald-benchmark-operator vald/vald-benchmark-operator

## Configuration

| Key | Type | Default | Description |
| ----------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| affinity | object | `{}` | affinity |
| annotations | object | `{}` | deployment annotations |
| image.pullPolicy | string | `"Always"` | image pull policy |
| image.repository | string | `"vdaas/vald-benchmark-operator"` | job image repository |
| image.tag | string | `"v1.7.5"` | image tag for job docker image |
| image.tag | string | `"v1.7.11"` | image tag for job docker image |
| job_image.pullPolicy | string | `"Always"` | |
| job_image.repository | string | `"vdaas/vald-benchmark-job"` | |
| job_image.tag | string | `"v1.7.5"` | |
| job_image.tag | string | `"v1.7.11"` | |
| logging.format | string | `"raw"` | logging format. logging format must be `raw` or `json` |
| logging.level | string | `"debug"` | logging level. logging level must be `debug`, `info`, `warn`, `error` or `fatal`. |
| logging.logger | string | `"glg"` | logger name. currently logger must be `glg` or `zap`. |
Expand Down Expand Up @@ -180,7 +181,3 @@ A benchmark operator for benchmarking the Vald cluster.
| time_zone | string | `""` | time_zone |
| tolerations | list | `[]` | tolerations |
| version | string | `"v0.0.0"` | version of benchmark-operator config |

---

Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
29 changes: 29 additions & 0 deletions charts/vald-benchmark-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Vald Benchmark Operator
===

This is a Helm chart to install `vald-benchmark-operator`.


Current chart version is `{{ template "chart.version" . }}`

Table of Contents
---

- [Install](#install)
- [Configuration](#configuration)

Install
---

Add Vald Helm repository

$ helm repo add vald https://vald.vdaas.org/charts

Run the following command to install the chart,

$ helm install vald-benchmark-operator vald/vald-benchmark-operator

Configuration
---

{{ template "chart.valuesTable" . }}
4 changes: 2 additions & 2 deletions charts/vald-benchmark-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ image:
repository: vdaas/vald-benchmark-operator
# @schema {"name": "image.tag", "type": "string"}
# image.tag -- image tag
tag: v1.7.5
tag: v1.7.11
# @schema {"name": "image.pullPolicy", "type": "string", "enum": ["Always", "Never", "IfNotPresent"]}
# image.pullPolicy -- image pull policy
pullPolicy: Always
Expand All @@ -44,7 +44,7 @@ job_image:
repository: vdaas/vald-benchmark-job
# @schema {"name": "job_image.tag", "type": "string"}
# image.tag -- image tag for job docker image
tag: v1.7.5
tag: v1.7.11
# @schema {"name": "job_image.pullPolicy", "type": "string", "enum": ["Always", "Never", "IfNotPresent"]}
# image.pullPolicy -- image pull policy
pullPolicy: Always
Expand Down
2 changes: 1 addition & 1 deletion charts/vald-readreplica/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

apiVersion: v2
name: vald-readreplica
version: v1.7.10
version: v1.7.11
description: A helm chart for readreplica add-on
type: application
keywords:
Expand Down
2 changes: 1 addition & 1 deletion charts/vald-readreplica/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This is a Helm chart to install Vald readreplica components.

Current chart version is `v1.7.10`
Current chart version is `v1.7.11`

## Install

Expand Down
Loading

0 comments on commit e6b96f2

Please sign in to comment.