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

feat: add capkk #2478

Draft
wants to merge 1 commit into
base: feature-gitops
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
38 changes: 35 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
bin
example
exp
# Binaries for programs and plugins
*.exe
*.dll
*.so
*.dylib
*.tmp
.DS_Store

# Test binary, build with `go test -c`
*.test

# IntelliJ
.idea/
*.iml

# Vscode files
.vscode

# rbac and manager config for example provider
manager_image_patch.yaml-e
manager_pull_policy.yaml-e

# Sample config files auto-generated by kubebuilder
config/samples

# test results
_artifacts

# Used during parts of the build process. Files _should_ get cleaned up automatically.
# This is also a good location for any temporary manfiests used during development
tmp

# Used by current object
/_output/
dist/
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ jobs:
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23

- name: Sync mod
run: make generate-modules

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
version: v1.63.3

verify:
name: verify
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
go-version: 1.23.3

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
Expand All @@ -38,3 +38,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LDFLAGS: ${{ steps.prepare.outputs.ldflags }}

- name: Upload Extra File
run: |
TAG=${{ env.GITHUB_REF_NAME }} make generate
gh release upload "$TAG" config/capkk/infrastructure-components.yaml --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 0 additions & 42 deletions .github/workflows/sync-vendor.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
# Test binary, build with `go test -c`
*.test

# E2E test templates
test/e2e/data/infrastructure-kubekey/v1beta1/cluster-template*.yaml

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# IntelliJ
.idea/
*.iml
Expand Down
40 changes: 25 additions & 15 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ linters:
- errchkjson
- errname
- errorlint
- exhaustive
# - exhaustive
# - exhaustruct
- exportloopref
- fatcontext
Expand All @@ -39,12 +39,12 @@ linters:
- gocritic
- gocyclo
- godot
- godox
# - godox
- gofmt
# - gofumpt
- goheader
- goimports
- gomoddirectives
# - gomoddirectives
- gomodguard
- goprintffuncname
- gosec
Expand All @@ -68,7 +68,7 @@ linters:
# - musttag
- nakedret
- nestif
- nilerr
# - nilerr
- nilnil
- nlreturn
- noctx
Expand Down Expand Up @@ -152,11 +152,6 @@ linters-settings:
- k8s.io
- sigs.k8s.io
- github.com/kubesphere/kubekey
exhaustive:
# Enum types matching the supplied regex do not have to be listed in
# switch statements to satisfy exhaustiveness.
# Default: ""
ignore-enum-types: "fsnotify.Op|v1alpha1.TaskPhase|reflect.Kind"
forbidigo:
# Forbid the following identifiers (list of regexp).
# Default: ["^(fmt\\.Print(|f|ln)|print|println)$"]
Expand Down Expand Up @@ -275,12 +270,21 @@ linters-settings:
# kubekey
- pkg: "github.com/kubesphere/kubekey/v4/pkg/const"
alias: _const
- pkg: "github.com/kubesphere/kubekey/v4/pkg/apis/core/v1"
- pkg: "github.com/kubesphere/kubekey/api/core/v1"
alias: kkcorev1
- pkg: "github.com/kubesphere/kubekey/v4/pkg/apis/core/v1alpha1"
- pkg: "github.com/kubesphere/kubekey/api/core/v1alpha1"
alias: kkcorev1alpha1
- pkg: "github.com/kubesphere/kubekey/v4/pkg/apis/project/v1"
- pkg: "github.com/kubesphere/kubekey/api/project/v1"
alias: kkprojectv1
- pkg: "github.com/kubesphere/kubekey/api/capkk/infrastructure/v1beta1"
alias: capkkinfrav1beta1
# cluster-api
- pkg: "sigs.k8s.io/cluster-api/api/v1beta1"
alias: clusterv1beta1
- pkg: "sigs.k8s.io/cluster-api/util"
alias: clusterutil
- pkg: "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1"
alias: kubeadmcpv1beta1
nestif:
# Minimal complexity of if statements to report.
# Default: 5
Expand Down Expand Up @@ -733,7 +737,7 @@ linters-settings:
# # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: false
disabled: true
exclude: [""]
arguments:
- allowRegex: "^_"
Expand Down Expand Up @@ -890,10 +894,16 @@ issues:

run:
timeout: 10m
go: "1.22"
go: "1.23"
build-tags:
- builtin
- clusterapi
executor-dirs:
- _output
- dist
- .git
- vendor
- .github
- config
- builtin
- plugins
allow-parallel-runners: true
Loading
Loading