Skip to content

Commit

Permalink
Merge branch 'main' into support/available-probe-and-status
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf committed Sep 26, 2024
2 parents 66fb8f1 + 54328df commit 63b6368
Show file tree
Hide file tree
Showing 725 changed files with 175,152 additions and 27,438 deletions.
52 changes: 51 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
* @nayutah @ldming @heng4fun @free6om @wangyelei @Y-Rookie @weicao
* @apecloud/kb-reviewers

# Cluster APIs
apis/**/cluster*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
apis/**/component*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
apis/**/service*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
controllers/apps/cluster*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
controllers/apps/transformer_cluster*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
controllers/apps/component*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
controllers/apps/transformer_component*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers
controllers/apps/service*.go @leon-inf @Y-Rookie @apecloud/kb-reviewers

# OpsRequest API
apis/**/opsrequest*.go @wangyelei @apecloud/kb-reviewers
apis/**/opsdefinition*.go @wangyelei @apecloud/kb-reviewers
controllers/apps/opsdefinition*.go @wangyelei @apecloud/kb-reviewers
controllers/apps/operations/ @wangyelei @apecloud/kb-reviewers

# Config API
apis/**/config*.go @sophon-zt @apecloud/kb-reviewers
controllers/apps/configuration/ @sophon-zt @apecloud/kb-reviewers
controllers/apps/operations/reconfigure*.go @sophon-zt @apecloud/kb-reviewers

# DataProtection APIs
apis/dataprotection/ @ldming @wangyelei @zjx20 @apecloud/kb-reviewers
controllers/dataprotection/ @ldming @wangyelei @zjx20 @apecloud/kb-reviewers
pkg/dataprotection/ @ldming @wangyelei @zjx20 @apecloud/kb-reviewers

# Experimental APIs
apis/experimental/ @free6om @apecloud/kb-reviewers
controllers/experimental/ @free6om @apecloud/kb-reviewers

# Extensions APIs
apis/extensions/ @ldming @apecloud/kb-reviewers
controllers/extensions/ @ldming @apecloud/kb-reviewers

# Workloads APIs
apis/workloads/ @free6om @apecloud/kb-reviewers
controllers/workloads/ @free6om @apecloud/kb-reviewers

# Docs
docs/ @michelle-0808 @shanshanying @apecloud/kb-reviewers
i18n/ @michelle-0808 @shanshanying @apecloud/kb-reviewers
docs/developer_docs/api-reference/

# Examples
examples/ @ahjing99 @shanshanying @apecloud/kb-reviewers

# Tests
.github/ @JashBook @ahjing99 @apecloud/kb-reviewers
test/e2e/ @JashBook @ahjing99 @linghan-hub @apecloud/kb-reviewers
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: kind/bug
assignees: nayutah
assignees: shanshanying

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest a user related feature for this project
title: "[Features]"
labels: area/user-interaction, documentation, kind/feature
assignees: nayutah
assignees: shanshanying

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/improvement-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Improvement request
about: Suggest an improvement idea for this project
title: "[Improvement]"
labels: kind/enhancement
assignees: nayutah
assignees: shanshanying

---

Expand Down
107 changes: 5 additions & 102 deletions .github/workflows/cicd-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
runs-on: ubuntu-latest
outputs:
trigger-mode: ${{ steps.get_trigger_mode.outputs.trigger_mode }}
matrix: ${{ steps.get_trigger_mode.outputs.matrix }}
git-commit: ${{ steps.get_git_info.outputs.git_commit }}
git-version: ${{ steps.get_git_info.outputs.git_version }}
steps:
Expand Down Expand Up @@ -48,15 +47,6 @@ jobs:
echo $TRIGGER_MODE
echo trigger_mode=$TRIGGER_MODE >> $GITHUB_OUTPUT
TEST_PACKAGES=`bash .github/utils/utils.sh --type 16 \
--trigger-type "$TRIGGER_MODE" \
--test-pkgs "${{ vars.TEST_PKGS }}" \
--test-check "${{ vars.TEST_CHECK }}" \
--test-pkgs-first "${{ vars.TEST_PKGS_FIRST }}" \
--ignore-pkgs "${{ vars.SKIP_CHECK_PKG }}"`
echo "$TEST_PACKAGES"
echo "matrix={\"include\":[$TEST_PACKAGES]}" >> $GITHUB_OUTPUT
- name: get git info
id: get_git_info
run: |
Expand All @@ -65,54 +55,14 @@ jobs:
echo git_commit=$GIT_COMMIT >> $GITHUB_OUTPUT
echo git_version=$GIT_VERSION >> $GITHUB_OUTPUT
test-parallel:
name: test
needs: trigger-mode
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') && github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.trigger-mode.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- name: install lib
run: |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libbtrfs-dev \
libdevmapper-dev
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "${{ env.GO_VERSION }}"

- name: Install golangci-lint
if: matrix.ops == 'lint'
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
- name: make ${{ matrix.ops }}
if: ${{ ! contains(matrix.ops, '/') }}
run: |
make ${{ matrix.ops }}
- name: make test ${{ matrix.ops }}
if: ${{ contains(matrix.ops, '/') }}
run: |
if [[ -d "./${{ matrix.ops }}" ]]; then
make test TEST_PACKAGES=./${{ matrix.ops }}/...
fi
pr-pre-check:
needs: trigger-mode
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') && github.event.pull_request.head.repo.full_name != github.repository }}
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
ops: [ 'manifests', 'mod-vendor', 'generate', 'lint', 'staticcheck' ]
ops: [ 'manifests', 'mod-vendor', 'generate', 'lint', 'staticcheck', 'test' ]
steps:
- uses: actions/checkout@v4
- name: install lib
Expand Down Expand Up @@ -143,25 +93,15 @@ jobs:
exit 1
fi
pr-make-test:
needs: trigger-mode
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') && github.event.pull_request.head.repo.full_name != github.repository }}
outputs:
runner-name: ${{ steps.get_runner_name.outputs.runner_name }}
runs-on: [ self-hosted, gke-runner-go1.21 ]
steps:
- uses: actions/checkout@v4
- name: make test
run: |
make test
- name: ignore cover pkgs
if: matrix.ops == 'test'
run: |
bash .github/utils/utils.sh --type 14 \
--file cover.out \
--ignore-pkgs "${{ vars.IGNORE_COVERAGE_PKG }}"
- name: upload coverage report
if: matrix.ops == 'test'
uses: codecov/codecov-action@v3
continue-on-error: true
with:
Expand All @@ -171,25 +111,6 @@ jobs:
name: codecov-report
verbose: true

- name: kill kube-apiserver and etcd
id: get_runner_name
if: ${{ always() }}
run: |
echo runner_name=${RUNNER_NAME} >> $GITHUB_OUTPUT
bash .github/utils/utils.sh --type 8
remove-runner:
needs: [ trigger-mode, pr-make-test ]
runs-on: ubuntu-latest
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') && github.event.pull_request.head.repo.full_name != github.repository && always() }}
steps:
- uses: actions/checkout@v4
- name: remove runner
run: |
bash .github/utils/utils.sh --type 9 \
--github-token ${{ env.GITHUB_TOKEN }} \
--runner-name ${{ needs.pr-make-test.outputs.runner-name }}
check-image:
needs: trigger-mode
if: contains(needs.trigger-mode.outputs.trigger-mode, '[docker]')
Expand Down Expand Up @@ -245,35 +166,17 @@ jobs:

pr-check:
name: make test
needs: [ trigger-mode, test-parallel, pr-pre-check, pr-make-test,
check-image, check-tools-image, check-dataprotection-image, check-helm ]
needs: [ trigger-mode, pr-pre-check, check-image, check-tools-image, check-dataprotection-image, check-helm ]
if: ${{ github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'pre-approve') && always() }}
runs-on: ubuntu-latest
steps:
- name: test parallel check
if: github.event.pull_request.head.repo.full_name == github.repository
run: |
if [[ "${{ needs.test-parallel.result }}" == "failure" || "${{ needs.test-parallel.result }}" == "cancelled" ]]; then
echo "test parallel fail"
exit 1
fi
- name: pr pre check
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
if [[ "${{ needs.pr-pre-check.result }}" == "failure" || "${{ needs.pr-pre-check.result }}" == "cancelled" ]]; then
echo "make test fail"
exit 1
fi
- name: make test check
if: github.event.pull_request.head.repo.full_name != github.repository
run: |
if [[ "${{ needs.pr-make-test.result }}" == "failure" || "${{ needs.pr-make-test.result }}" == "cancelled" ]]; then
echo "make test fail"
exit 1
fi
- name: release image check
run: |
if [[ "${{ needs.check-image.result }}" == "failure" || "${{ needs.check-image.result }}" == "cancelled" ]]; then
Expand Down
44 changes: 4 additions & 40 deletions .github/workflows/cicd-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
strategy:
fail-fast: true
matrix:
ops: [ 'manifests', 'mod-vendor', 'generate', 'lint', 'staticcheck' ]
ops: [ 'manifests', 'mod-vendor', 'generate', 'lint', 'staticcheck', 'test' ]
steps:
- uses: actions/checkout@v4
- name: install lib
Expand Down Expand Up @@ -136,25 +136,15 @@ jobs:
exit 1
fi
push-make-test:
needs: trigger-mode
runs-on: [self-hosted, gke-runner-go1.21]
if: contains(needs.trigger-mode.outputs.trigger-mode, '[test]')
outputs:
runner-name: ${{ steps.get_runner_name.outputs.runner_name }}
steps:
- uses: actions/checkout@v4
- name: make test
run: |
make test
- name: ignore cover pkgs
if: matrix.ops == 'test'
run: |
bash .github/utils/utils.sh --type 14 \
--file cover.out \
--ignore-pkgs "${{ vars.IGNORE_COVERAGE_PKG }}"
- name: upload coverage report
if: matrix.ops == 'test'
uses: codecov/codecov-action@v3
continue-on-error: true
with:
Expand All @@ -164,25 +154,6 @@ jobs:
name: codecov-report
verbose: true

- name: kill kube-apiserver and etcd
id: get_runner_name
if: ${{ always() }}
run: |
echo runner_name=${RUNNER_NAME} >> $GITHUB_OUTPUT
bash .github/utils/utils.sh --type 8
remove-runner:
needs: [ trigger-mode, push-make-test ]
runs-on: ubuntu-latest
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[test]') && always() }}
steps:
- uses: actions/checkout@v4
- name: remove runner
run: |
bash .github/utils/utils.sh --type 9 \
--github-token "${{ env.GITHUB_TOKEN }}" \
--runner-name ${{ needs.push-make-test.outputs.runner-name }}
check-image:
needs: trigger-mode
if: ${{ contains(needs.trigger-mode.outputs.trigger-mode, '[docker]') }}
Expand Down Expand Up @@ -302,7 +273,7 @@ jobs:
push-check:
name: make-test
needs: [ trigger-mode, push-pre-check, push-make-test, check-image, check-tools-image,
needs: [ trigger-mode, push-pre-check, check-image, check-tools-image,
check-dataprotection-image, check-helm, apis-doc, check-license-header ]
if: ${{ always() }}
runs-on: ubuntu-latest
Expand All @@ -314,13 +285,6 @@ jobs:
exit 1
fi
- name: make test check
run: |
if [[ "${{ needs.push-make-test.result }}" == "failure" || "${{ needs.push-make-test.result }}" == "cancelled" ]]; then
echo "make test fail"
exit 1
fi
- name: release image check
run: |
if [[ "${{ needs.check-image.result }}" == "failure" || "${{ needs.check-image.result }}" == "cancelled" ]]; then
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/e2e-kbcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ on:
CLOUD_PROVIDER:
description: 'cloud provider'
required: true
default: 'eks'
default: 'vke'
type: choice
options:
- vke
- gke
- eks
- aks
- aks-cn
CLUSTER_VERSION:
description: 'k8s cluster version'
required: false
default: '1.27'
default: '1.28'
type: choice
options:
- 1.30
- 1.29
- 1.28
- 1.27
Expand Down Expand Up @@ -86,6 +88,8 @@ jobs:
CLUSTER_REGION=""
if [[ "${{ inputs.CLOUD_PROVIDER }}" == 'eks' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_AWS_EKS }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'vke' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_VOLCENGINE_VKE }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'gke' && -z "$CLUSTER_REGION" ]]; then
CLUSTER_REGION="${{ vars.REGION_GCP_GKE }}"
elif [[ "${{ inputs.CLOUD_PROVIDER }}" == 'aks' && -z "$CLUSTER_REGION" ]]; then
Expand Down
Loading

0 comments on commit 63b6368

Please sign in to comment.