Skip to content

Feat: add kdp extension app by kubeSphere #179

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
53 changes: 53 additions & 0 deletions .github/workflows/ci-chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Chart

on:
release:
types:
- published
tags:
- v*

permissions:
contents: read

jobs:
publish-charts:
env:
HELM_CHART_DIR: helm/charts/kdp-infra

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608

- name: Get Version
id: get_version
run: |
CHART_VERSION=${GITHUB_REF#refs/tags/}
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_OUTPUT

- name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814
with:
version: v3.8.2

- name: Setup node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
with:
node-version: "20"
- name: Generate helm doc
run: |
make helm-doc-gen

- name: Docker Login
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.REG_USER }}
password: ${{ secrets.REG_PASSWD }}

- name: Tag helm chart and push to registry
run: |
chart_version=${{ steps.get_version.outputs.CHART_VERSION }}
sed -i "s/1.0.0/${chart_version}/g" $HELM_CHART_DIR/Chart.yaml
sed -i "s/1.0.0/${chart_version}/g" $HELM_CHART_DIR/values.yaml
helm package ./$HELM_CHART_DIR
helm push kdp-infra-${chart_version}.tgz oci://${{ secrets.CONTAINER_REGISTRY }}/linktimecloud
129 changes: 129 additions & 0 deletions .github/workflows/ci-infra-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: CI-Infra-Build

on:
release:
types:
- published
tags:
- v*

permissions:
contents: read

env:
# Common versions
GO_VERSION: '1.21'
GOLANG_CI_VERSION: 'v1.50'

jobs:
detect-noop:
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
permissions:
actions: write
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true

staticcheck:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
submodules: true

- name: Static Check
run: make static-check

lint:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests

steps:
- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
submodules: true

# This action uses its own setup-go, which always seems to use the latest
# stable version of Go. We could run 'make lint' to ensure our desired Go
# version, but we prefer this action because it leaves 'annotations' (i.e.
# it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: ${{ env.GOLANGCI_VERSION }}

check-cli-build:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
submodules: true

- name: Get Version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT

- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ env.GO_VERSION }}

- name: Cache Go Dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Set up QEMU
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0

- uses: actions/checkout@v4
- name: Docker Login
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
username: ${{ secrets.REG_USER }}
password: ${{ secrets.REG_PASSWD }}

- name: Run Build Images
run: |
version=${{ steps.get_version.outputs.VERSION }}
make multi-arch-builder IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }} VERSION=${version}
make publish IMG_REGISTRY=${{ secrets.CONTAINER_REGISTRY }} VERSION=${version}

- name: Cleanup binary
run: make kdp-cli-clean
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,4 @@ bin
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# build
kdp

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include makefiles/const.mk
include makefiles/build.mk
include makefiles/build-helm-package.mk
include makefiles/dependency.mk

##@ General
Expand Down
1 change: 1 addition & 0 deletions catalog/mysql/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: MySQL
category: 系统/大数据开发工具
description: MySQL主从架构的容器化实现,默认创建一套MySQL主从服务,MySQL exporter和备份服务
group: Middleware
i18n:
en:
category: system.dataManagement
Expand Down
1 change: 1 addition & 0 deletions catalog/operator/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Operator
category: 系统/大数据开发工具
description: Operator 是 Kubernetes 的扩展软件, 它利用定制资源管理应用及其组件。
group: GlobalService
i18n:
en:
category: system.dataManagement
Expand Down
Loading
Loading