Skip to content

Commit

Permalink
controlPlaneLoadBalancer
Browse files Browse the repository at this point in the history
  • Loading branch information
joyceliu committed Jan 3, 2025
1 parent 3e56b09 commit c6b8087
Show file tree
Hide file tree
Showing 6,895 changed files with 9,941 additions and 2,023,153 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
42 changes: 0 additions & 42 deletions .github/workflows/sync-vendor.yml

This file was deleted.

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
34 changes: 19 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ export PATH := $(abspath $(OUTPUT_BIN_DIR)):$(abspath $(OUTPUT_TOOLS_DIR)):$(PAT
# Binaries.
#
# Note: Need to use abspath so we can invoke these from subdirectories
KUSTOMIZE_VER := v4.5.2
KUSTOMIZE_VER := v5.5.0
KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(OUTPUT_TOOLS_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v4
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5

SETUP_ENVTEST_VER := v0.0.0-20240521074430-fbb7d370bebc
SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(OUTPUT_TOOLS_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest

CONTROLLER_GEN_VER := v0.15.0
CONTROLLER_GEN_VER := v0.16.5
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(OUTPUT_TOOLS_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
Expand Down Expand Up @@ -105,8 +105,8 @@ REGISTRY ?= docker.io/kubespheredev
#PROD_REGISTRY ?= docker.io/kubesphere

# capkk
#CAPKK_IMAGE_NAME ?= capkk-controller
#CAPKK_CONTROLLER_IMG ?= $(REGISTRY)/$(CAPKK_IMAGE_NAME)
CAPKK_IMAGE_NAME ?= capkk-controller-manager
CAPKK_CONTROLLER_IMG ?= $(REGISTRY)/$(CAPKK_IMAGE_NAME)
# controller-manager
OPERATOR_IMAGE_NAME ?= kk-controller-manager
OPERATOR_CONTROLLER_IMG ?= $(REGISTRY)/$(OPERATOR_IMAGE_NAME)
Expand Down Expand Up @@ -163,30 +163,34 @@ generate: ## Run all generate-manifests-*, generate-go-deepcopy-* targets

.PHONY: generate-go-deepcopy-kubekey
generate-go-deepcopy-kubekey: $(CONTROLLER_GEN) ## Generate deepcopy object
$(MAKE) clean-generated-deepcopy SRC_DIRS="./pkg/apis/"
$(MAKE) clean-generated-deepcopy SRC_DIRS="./api/"
$(CONTROLLER_GEN) \
object:headerFile=./hack/boilerplate.go.txt \
paths=./pkg/apis/...
paths=./api/...

.PHONY: generate-manifests-kubekey
generate-manifests-kubekey: $(CONTROLLER_GEN) ## Generate kubekey manifests e.g. CRD, RBAC etc.
$(CONTROLLER_GEN) \
paths=./pkg/apis/core/... \
paths=./api/core/... \
crd \
output:crd:dir=./config/kubekey/crds/

.PHONY: generate-manifests-capkk
generate-manifests-capkk: $(CONTROLLER_GEN) ## Generate capkk manifests e.g. CRD, RBAC etc.
generate-manifests-capkk: $(CONTROLLER_GEN) $(KUSTOMIZE) ## Generate capkk manifests e.g. CRD, RBAC etc.
$(CONTROLLER_GEN) \
paths=./pkg/apis/capkk/... \
crd webhook \
output:crd:dir=./config/capkk/crds/ \
output:webhook:dir=./config/capkk/webhook/
paths=./api/capkk/... \
crd \
output:crd:dir=./config/capkk/crds/
$(CONTROLLER_GEN) \
paths=./pkg/controllers/infrastructure/... \
rbac:roleName=capkk \
output:rbac:dir=./config/capkk/rbac
cd config/capkk && $(KUSTOMIZE) edit set image $(OPERATOR_CONTROLLER_IMG):$(TAG)
$(KUSTOMIZE) build config/capkk > config/capkk/infrastructure-components.yaml

.PHONY: generate-modules
generate-modules: ## Run go mod tidy to ensure modules are up to date
@go mod tidy && go mod vendor

@go mod tidy
.PHONY: generate-goimports
generate-goimports: ## Format all import, `goimports` is required.
@hack/update-goimports.sh
Expand Down
Loading

0 comments on commit c6b8087

Please sign in to comment.