Compare commits

..

10 Commits

Author SHA1 Message Date
yyzxw
424e433963 Feat: add controller metrics (#6650)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 4m24s
E2E MultiCluster Test / detect-noop (push) Successful in 24s
E2E Test / detect-noop (push) Successful in 20s
Go / detect-noop (push) Successful in 23s
license / Check for unapproved licenses (push) Failing after 2m40s
Registry / publish-core-images (push) Failing after 53s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 41s
Unit-Test / detect-noop (push) Successful in 16s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m25s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m12s
CodeQL / Analyze (go) (push) Failing after 16m11s
Go / staticcheck (push) Successful in 18m56s
Go / lint (push) Successful in 20m1s
Go / check-diff (push) Failing after 15m2s
Go / check-cli-image-build (push) Failing after 2m41s
Go / check-core-image-build (push) Successful in 18m10s
Unit-Test / unit-tests (push) Failing after 13m17s
Go / check-windows (push) Has been cancelled
* feat: add controller metrics

Signed-off-by: yyzxw <1020938856@qq.com>

* Fix: README changes after make reviewable

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Co-authored-by: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com>
Co-authored-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-03-02 17:02:58 -08:00
dependabot[bot]
b51957ef9f Chore: (deps): Bump golangci/golangci-lint-action from 6.1.1 to 6.5.0 (#6690)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 6m35s
E2E MultiCluster Test / detect-noop (push) Successful in 19s
E2E Test / detect-noop (push) Successful in 16s
Go / detect-noop (push) Successful in 16s
license / Check for unapproved licenses (push) Failing after 2m38s
Registry / publish-core-images (push) Failing after 46s
CodeQL / Analyze (go) (push) Failing after 11m34s
Unit-Test / detect-noop (push) Successful in 2s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 48s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 13s
Go / staticcheck (push) Successful in 2m7s
E2E Test / e2e-tests (v1.29) (push) Failing after 2m23s
Go / lint (push) Successful in 12m8s
Go / check-diff (push) Failing after 15m33s
Go / check-core-image-build (push) Successful in 4m53s
Go / check-cli-image-build (push) Failing after 3m17s
Unit-Test / unit-tests (push) Failing after 5m4s
Go / check-windows (push) Has been cancelled
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](971e284b60...2226d7cb06)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 09:25:57 -08:00
huochexizhan
cd0b0988f9 fix: fix incorrect nil return value (#6705)
Signed-off-by: huochexizhan <huochexizhan@outlook.com>
2025-03-02 09:23:56 -08:00
Taosh
ead624e553 chore: quick deploy button for kubevela (#6692)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m48s
E2E MultiCluster Test / detect-noop (push) Successful in 9s
E2E Test / detect-noop (push) Successful in 8s
Go / detect-noop (push) Successful in 8s
license / Check for unapproved licenses (push) Failing after 22s
Registry / publish-core-images (push) Failing after 22s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 35s
Unit-Test / detect-noop (push) Successful in 9s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 27s
E2E Test / e2e-tests (v1.29) (push) Failing after 24s
Definition-Lint / definition-doc (push) Failing after 6m49s
Go / staticcheck (push) Successful in 2m59s
Go / lint (push) Failing after 19m45s
Go / check-diff (push) Failing after 21m3s
Go / check-core-image-build (push) Failing after 5m16s
Go / check-cli-image-build (push) Failing after 3m11s
Unit-Test / unit-tests (push) Failing after 13m17s
Go / check-windows (push) Has been cancelled
Signed-off-by: 青炽 <hanyuntao.hyt@alibaba-inc.com>
Co-authored-by: 青炽 <hanyuntao.hyt@alibaba-inc.com>
2025-02-28 19:07:41 -08:00
Daniel Higuero
f5aed7aefd Update CODEOWNERS (#6695)
Remove dhiguero from codeowners
2025-02-28 19:02:20 -08:00
shivin
30249d5297 Fix: fix for skipping deletion of orphan resources (#6700)
* fix for skipping deletion of orphan resources

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>

* gofmt fix

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>

---------

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>
2025-02-28 19:00:31 -08:00
Anoop Gopalakrishnan
472e1f1e59 Fix: upddate deprecated action versions (#6702)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 33s
E2E MultiCluster Test / detect-noop (push) Successful in 9s
E2E Test / detect-noop (push) Successful in 9s
Go / detect-noop (push) Successful in 9s
license / Check for unapproved licenses (push) Failing after 15s
CodeQL / Analyze (go) (push) Failing after 1m55s
Registry / publish-core-images (push) Failing after 24s
Unit-Test / detect-noop (push) Successful in 9s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 36s
E2E Test / e2e-tests (v1.29) (push) Failing after 29s
Go / staticcheck (push) Successful in 20m2s
Go / lint (push) Failing after 22m11s
Go / check-core-image-build (push) Successful in 8m59s
Go / check-cli-image-build (push) Successful in 2m41s
Go / check-diff (push) Failing after 15m22s
Unit-Test / unit-tests (push) Failing after 5m29s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 35s
Go / check-windows (push) Has been cancelled
2025-02-28 11:08:05 +08:00
Tianxin Dong
33cd16d425 chore: update workflow to fix the compatibility for outputs (#6701)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m38s
E2E MultiCluster Test / detect-noop (push) Successful in 27s
E2E Test / detect-noop (push) Successful in 21s
Go / detect-noop (push) Successful in 26s
Definition-Lint / definition-doc (push) Successful in 3m19s
Registry / publish-core-images (push) Failing after 38s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 28s
Unit-Test / detect-noop (push) Successful in 2s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 19s
E2E Test / e2e-tests (v1.29) (push) Failing after 18s
license / Check for unapproved licenses (push) Failing after 3m3s
Go / staticcheck (push) Successful in 3m8s
Go / lint (push) Failing after 19m52s
Go / check-core-image-build (push) Failing after 4m24s
Go / check-cli-image-build (push) Failing after 3m5s
Go / check-diff (push) Successful in 25m18s
Unit-Test / unit-tests (push) Failing after 12m41s
Go / check-windows (push) Has been cancelled
Signed-off-by: FogDong <fog@bentoml.com>
2025-02-27 00:16:28 +05:30
Amit Singh
793ba55455 fix: switches to new helm repo url (#6694)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m2s
Definition-Lint / definition-doc (push) Failing after 7m6s
E2E MultiCluster Test / detect-noop (push) Successful in 25s
E2E Test / detect-noop (push) Successful in 35s
Go / detect-noop (push) Successful in 17s
license / Check for unapproved licenses (push) Failing after 2m49s
Registry / publish-core-images (push) Failing after 55s
Unit-Test / detect-noop (push) Successful in 23s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 2m27s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m37s
Go / staticcheck (push) Successful in 19m8s
Go / lint (push) Failing after 19m44s
Go / check-diff (push) Failing after 15m16s
Go / check-core-image-build (push) Failing after 4m5s
Go / check-cli-image-build (push) Failing after 3m1s
Unit-Test / unit-tests (push) Failing after 13m10s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 51s
Signed-off-by: Chitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2025-02-20 20:41:12 +05:30
Tianxin Dong
711c9f0053 fix: fix addon check (#6687)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m21s
Definition-Lint / definition-doc (push) Failing after 7m18s
E2E MultiCluster Test / detect-noop (push) Successful in 26s
E2E Test / detect-noop (push) Successful in 19s
Go / detect-noop (push) Successful in 19s
license / Check for unapproved licenses (push) Failing after 2m57s
Registry / publish-core-images (push) Failing after 45s
Unit-Test / detect-noop (push) Successful in 21s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m39s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m21s
Go / staticcheck (push) Successful in 17m18s
Go / lint (push) Failing after 19m39s
Go / check-diff (push) Failing after 14m58s
Go / check-core-image-build (push) Failing after 3m51s
Go / check-cli-image-build (push) Failing after 3m4s
Unit-Test / unit-tests (push) Failing after 12m46s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 56s
Signed-off-by: FogDong <fog@bentoml.com>
2025-02-12 13:18:39 +08:00
15 changed files with 188 additions and 87 deletions

30
.github/CODEOWNERS vendored
View File

@@ -1,35 +1,35 @@
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
* @barnettZQG @wonderflow @leejanee @Somefive @jefree-cat @FogDong @wangyikewxgm @chivalryq @anoop2811 @dhiguero
design/ @barnettZQG @leejanee @wonderflow @Somefive @jefree-cat @FogDong @anoop2811 @dhiguero
* @barnettZQG @wonderflow @leejanee @Somefive @jefree-cat @FogDong @wangyikewxgm @chivalryq @anoop2811
design/ @barnettZQG @leejanee @wonderflow @Somefive @jefree-cat @FogDong @anoop2811
# Owner of Core Controllers
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow @wangyikewxgm @chivalryq @anoop2811 @dhiguero
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow @wangyikewxgm @chivalryq @anoop2811
# Owner of Standard Controllers
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive @anoop2811 @dhiguero @FogDong
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive @anoop2811 @FogDong
# Owner of CUE
pkg/cue @leejanee @FogDong @Somefive @anoop2811 @dhiguero
pkg/stdlib @leejanee @FogDong @Somefive @anoop2811 @dhiguero
pkg/cue @leejanee @FogDong @Somefive @anoop2811
pkg/stdlib @leejanee @FogDong @Somefive @anoop2811
# Owner of Workflow
pkg/workflow @leejanee @FogDong @Somefive @wangyikewxgm @chivalryq @anoop2811 @dhiguero
pkg/workflow @leejanee @FogDong @Somefive @wangyikewxgm @chivalryq @anoop2811
# Owner of vela templates
vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong @wangyikewxgm @chivalryq @anoop2811 @dhiguero
vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong @wangyikewxgm @chivalryq @anoop2811
# Owner of vela CLI
references/cli/ @Somefive @StevenLeiZhang @charlie0129 @wangyikewxgm @chivalryq @anoop2811 @dhiguero @FogDong
references/cli/ @Somefive @StevenLeiZhang @charlie0129 @wangyikewxgm @chivalryq @anoop2811 @FogDong
# Owner of vela addon framework
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129 @anoop2811 @dhiguero @FogDong
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129 @anoop2811 @FogDong
# Owner of resource keeper and tracker
pkg/resourcekeeper @Somefive @FogDong @chivalryq @anoop2811 @dhiguero
pkg/resourcetracker @Somefive @FogDong @chivalryq @anoop2811 @dhiguero
pkg/resourcekeeper @Somefive @FogDong @chivalryq @anoop2811
pkg/resourcetracker @Somefive @FogDong @chivalryq @anoop2811
.github/ @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
makefiles @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
go.* @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @dhiguero
.github/ @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811
makefiles @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811
go.* @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811

View File

@@ -83,7 +83,7 @@ jobs:
# 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@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
with:
version: ${{ env.GOLANGCI_VERSION }}

View File

@@ -47,7 +47,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
uses: actions/upload-artifact@134dcf33c0b9454c4b17a936843d7e21dccdc335 # v4.3.6
with:
name: SARIF file
path: results.sarif

View File

@@ -59,6 +59,14 @@ and share the large growing community [addons](https://kubevela.net/docs/referen
* [Installation](https://kubevela.io/docs/install)
* [Deploy Your Application](https://kubevela.io/docs/quick-start)
### Get Your Own Demo with Alibaba Cloud
- install KubeVela on a Serverless K8S cluster in 3 minutes, try:
<a href="https://acs.console.aliyun.com/quick-deploy?repo=kubevela/kubevela&branch=master" target="_blank">
<img src="https://img.alicdn.com/imgextra/i1/O1CN01aiPSuA1Wiz7wkgF5u_!!6000000002823-55-tps-399-70.svg" width="200" alt="Deploy on Alibaba Cloud">
</a>
## Documentation
Full documentation is available on the [KubeVela website](https://kubevela.io/).

View File

@@ -102,16 +102,16 @@ func (in *GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstruct
}
// FindDeleteOption find delete option for target resource
func (in *GarbageCollectPolicySpec) FindDeleteOption(manifest *unstructured.Unstructured) []client.DeleteOption {
func (in *GarbageCollectPolicySpec) FindDeleteOption(manifest *unstructured.Unstructured) (bool, []client.DeleteOption) {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) && rule.Propagation != nil {
switch *rule.Propagation {
case GarbageCollectPropagationOrphan:
return []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationOrphan)}
return true, []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationOrphan)}
case GarbageCollectPropagationCascading:
return []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationBackground)}
return false, []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationBackground)}
}
}
}
return nil
return false, nil
}

View File

@@ -102,23 +102,25 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
### MultiCluster parameters
| Name | Description | Value |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.metrics.enabled` | Whether to enable multi-cluster metrics collect | `false` |
| `multicluster.clusterGateway.direct` | controller will connect to ClusterGateway directly instead of going to Kubernetes APIServer | `true` |
| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` |
| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` |
| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` |
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.9.0-alpha.2` |
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
| `multicluster.clusterGateway.resources.requests.cpu` | ClusterGateway cpu request | `50m` |
| `multicluster.clusterGateway.resources.requests.memory` | ClusterGateway memory request | `20Mi` |
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `500m` |
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` |
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
| `multicluster.clusterGateway.secureTLS.certManager.enabled` | Whether to enable cert-manager | `false` |
| Name | Description | Value |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | -------------------------------- |
| `multicluster.enabled` | Whether to enable multi-cluster | `true` |
| `multicluster.metrics.enabled` | Whether to enable multi-cluster metrics collect | `false` |
| `multicluster.clusterGateway.direct` | controller will connect to ClusterGateway directly instead of going to Kubernetes APIServer | `true` |
| `multicluster.clusterGateway.replicaCount` | ClusterGateway replica count | `1` |
| `multicluster.clusterGateway.port` | ClusterGateway port | `9443` |
| `multicluster.clusterGateway.image.repository` | ClusterGateway image repository | `oamdev/cluster-gateway` |
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.9.0-alpha.2` |
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
| `multicluster.clusterGateway.resources.requests.cpu` | ClusterGateway cpu request | `50m` |
| `multicluster.clusterGateway.resources.requests.memory` | ClusterGateway memory request | `20Mi` |
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `500m` |
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
| `multicluster.clusterGateway.secureTLS.enabled` | Whether to enable secure TLS | `true` |
| `multicluster.clusterGateway.secureTLS.certPath` | Path to the certificate file | `/etc/k8s-cluster-gateway-certs` |
| `multicluster.clusterGateway.secureTLS.certManager.enabled` | Whether to enable cert-manager | `false` |
| `multicluster.clusterGateway.serviceMonitor.enabled` | Whether to enable service monitor | `false` |
| `multicluster.clusterGateway.serviceMonitor.additionalLabels` | Additional labels for service monitor | `{}` |
### Test parameters
@@ -131,29 +133,32 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
### Common parameters
| Name | Description | Value |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| `imagePullSecrets` | Image pull secrets | `[]` |
| `nameOverride` | Override name | `""` |
| `fullnameOverride` | Fullname override | `""` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` |
| `nodeSelector` | Node selector | `{}` |
| `tolerations` | Tolerations | `[]` |
| `affinity` | Affinity | `{}` |
| `rbac.create` | Specifies whether a RBAC role should be created | `true` |
| `logDebug` | Enable debug logs for development purpose | `false` |
| `logFilePath` | If non-empty, write log files in this path | `""` |
| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` |
| `kubeClient.qps` | The qps for reconcile clients | `400` |
| `kubeClient.burst` | The burst for reconcile clients | `600` |
| `authentication.enabled` | Enable authentication for application | `false` |
| `authentication.withUser` | Application authentication will impersonate as the request User | `true` |
| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` |
| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` |
| `sharding.enabled` | When sharding enabled, the controller will run as master mode. Refer to https://github.com/kubevela/kubevela/blob/master/design/vela-core/sharding.md for details. | `false` |
| `sharding.schedulableShards` | The shards available for scheduling. If empty, dynamic discovery will be used. | `""` |
| Name | Description | Value |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
| `imagePullSecrets` | Image pull secrets | `[]` |
| `nameOverride` | Override name | `""` |
| `fullnameOverride` | Fullname override | `""` |
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | `nil` |
| `nodeSelector` | Node selector | `{}` |
| `tolerations` | Tolerations | `[]` |
| `affinity` | Affinity | `{}` |
| `rbac.create` | Specifies whether a RBAC role should be created | `true` |
| `logDebug` | Enable debug logs for development purpose | `false` |
| `logFilePath` | If non-empty, write log files in this path | `""` |
| `logFileMaxSize` | Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. | `1024` |
| `kubeClient.qps` | The qps for reconcile clients | `400` |
| `kubeClient.burst` | The burst for reconcile clients | `600` |
| `authentication.enabled` | Enable authentication for application | `false` |
| `authentication.withUser` | Application authentication will impersonate as the request User | `true` |
| `authentication.defaultUser` | Application authentication will impersonate as the User if no user provided in Application | `kubevela:vela-core` |
| `authentication.groupPattern` | Application authentication will impersonate as the request Group that matches the pattern | `kubevela:*` |
| `sharding.enabled` | When sharding enabled, the controller will run as master mode. Refer to https://github.com/kubevela/kubevela/blob/master/design/vela-core/sharding.md for details. | `false` |
| `sharding.schedulableShards` | The shards available for scheduling. If empty, dynamic discovery will be used. | `""` |
| `core.metrics.enabled` | Enable metrics for vela-core | `false` |
| `core.metrics.serviceMonitor.enabled` | Enable service monitor for metrics | `false` |
| `core.metrics.serviceMonitor.additionalLabels` | Additional labels for service monitor | `{}` |
## Uninstallation

View File

@@ -124,6 +124,7 @@ spec:
- protocol: TCP
port: {{ .Values.multicluster.clusterGateway.port }}
targetPort: {{ .Values.multicluster.clusterGateway.port }}
name: default
---
# 1. Check whether APIService ""v1alpha1.cluster.core.oam.dev" is already present in the cluster
# 2.a If the APIService doesn't exist, create it.

View File

@@ -399,3 +399,82 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.core.metrics.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "kubevela.fullname" . }}-metrics
namespace: {{ .Release.Namespace }}
labels:
component: vela-core-controller
spec:
ports:
- name: http
protocol: TCP
port: 9443
targetPort: 9443
- name: metrics
protocol: TCP
port: 8080
targetPort: 8080
selector:
{{- include "kubevela.selectorLabels" . | nindent 4 }}
{{ if .Values.sharding.enabled }}
controller.core.oam.dev/shard-id: master
{{ end }}
{{- end -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.core.metrics.enabled .Values.core.metrics.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "kubevela.fullname" . }}-metrics
namespace: {{ .Release.Namespace }}
labels:
{{- with .Values.core.metrics.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: metrics
scheme: http
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
component: vela-core-controller
{{- end -}}
{{- if and (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") .Values.multicluster.metrics.enabled .Values.multicluster.clusterGateway.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "kubevela.fullname" . }}-cluster-gateway-metrics
namespace: {{ .Release.Namespace }}
labels:
{{- with .Values.multicluster.clusterGateway.serviceMonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
endpoints:
- honorLabels: true
interval: 10s
path: /metrics
port: default
scheme: http
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "kubevela-cluster-gateway.selectorLabels" . | nindent 4 }}
{{- end -}}

View File

@@ -158,12 +158,17 @@ featureGates:
## @param multicluster.clusterGateway.secureTLS.enabled Whether to enable secure TLS
## @param multicluster.clusterGateway.secureTLS.certPath Path to the certificate file
## @param multicluster.clusterGateway.secureTLS.certManager.enabled Whether to enable cert-manager
## @param multicluster.clusterGateway.serviceMonitor.enabled Whether to enable service monitor
## @param multicluster.clusterGateway.serviceMonitor.additionalLabels Additional labels for service monitor
multicluster:
enabled: true
metrics:
enabled: false
clusterGateway:
direct: true
serviceMonitor:
enabled: false
additionalLabels: { }
replicaCount: 1
port: 9443
image:
@@ -297,3 +302,13 @@ authentication:
sharding:
enabled: false
schedulableShards: ""
## @param core.metrics.enabled Enable metrics for vela-core
## @param core.metrics.serviceMonitor.enabled Enable service monitor for metrics
## @param core.metrics.serviceMonitor.additionalLabels Additional labels for service monitor
core:
metrics:
enabled: false
serviceMonitor:
enabled: false
additionalLabels: {}

2
go.mod
View File

@@ -38,7 +38,7 @@ require (
github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174
github.com/imdario/mergo v0.3.16
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9
github.com/kubevela/workflow v0.6.1-0.20241210074645-d8a85b26c862
github.com/kubevela/workflow v0.6.1-0.20250226022524-23468c911a01
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/magiconair/properties v1.8.7
github.com/mattn/go-runewidth v0.0.15

4
go.sum
View File

@@ -644,8 +644,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9 h1:VgW3WgcQ5jZcWUvKULfnV7w8vfp86yGp6Es4NFJpiCg=
github.com/kubevela/pkg v1.9.3-0.20241203070234-2cf98778c0a9/go.mod h1:mb14wKSzUVKsSupXEjnci2vCd8DTkN4mBYdz9wvS7Vk=
github.com/kubevela/workflow v0.6.1-0.20241210074645-d8a85b26c862 h1:EaXO5m/4ewOBa1CAHqFt9RqN/+oh566YKKpQJ6a1MBU=
github.com/kubevela/workflow v0.6.1-0.20241210074645-d8a85b26c862/go.mod h1:nJIoAw1SHthfLhJqFFKX2dwwoDy6vF2DZrBdlAJNSXU=
github.com/kubevela/workflow v0.6.1-0.20250226022524-23468c911a01 h1:E2QTiakMlz7ICp/p9os0NZs4BTDq4rKtfzdTOMuBFM8=
github.com/kubevela/workflow v0.6.1-0.20250226022524-23468c911a01/go.mod h1:nJIoAw1SHthfLhJqFFKX2dwwoDy6vF2DZrBdlAJNSXU=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=

View File

@@ -1368,7 +1368,7 @@ func getDependencyArgs(ctx context.Context, k8sClient client.Client, depName str
_, depErr := FetchAddonRelatedApp(ctx, k8sClient, depName)
if depErr != nil {
if !apierrors.IsNotFound(depErr) {
return nil, err
return nil, depErr
}
depArgs := map[string]interface{}{}
if addonClusters != nil {

View File

@@ -398,18 +398,23 @@ func DeleteManagedResourceInApplication(ctx context.Context, cli client.Client,
}
util.RemoveAnnotations(obj, []string{oam.AnnotationAppSharedBy})
}
if mr.SkipGC || hasOrphanFinalizer(app) {
var opts []client.DeleteOption
var isOrphan bool
if garbageCollectPolicy, _ := policy.ParsePolicy[v1alpha1.GarbageCollectPolicySpec](app); garbageCollectPolicy != nil {
isOrphan, opts = garbageCollectPolicy.FindDeleteOption(obj)
}
if mr.SkipGC || hasOrphanFinalizer(app) || isOrphan {
if labels := obj.GetLabels(); labels != nil {
delete(labels, oam.LabelAppName)
delete(labels, oam.LabelAppNamespace)
obj.SetLabels(labels)
}
return errors.Wrapf(cli.Update(_ctx, obj), "failed to remove owner labels for resource while skipping gc")
}
var opts []client.DeleteOption
if garbageCollectPolicy, _ := policy.ParsePolicy[v1alpha1.GarbageCollectPolicySpec](app); garbageCollectPolicy != nil {
opts = garbageCollectPolicy.FindDeleteOption(obj)
return errors.Wrapf(cli.Update(_ctx, obj), "skipping deletion for resource")
}
if err := cli.Delete(_ctx, obj, opts...); err != nil && !kerrors.IsNotFound(err) {
return errors.Wrapf(err, "failed to delete resource %s", mr.ResourceKey())
}

View File

@@ -35,7 +35,6 @@ import (
"github.com/kubevela/pkg/cue/cuex"
workflowv1alpha1 "github.com/kubevela/workflow/api/v1alpha1"
"github.com/kubevela/workflow/pkg/cue/model/sets"
"github.com/kubevela/workflow/pkg/cue/model/value"
providertypes "github.com/kubevela/workflow/pkg/providers/types"
@@ -128,20 +127,9 @@ func ValidateView(ctx context.Context, viewStr string) error {
// Make sure `status` or `export` field exists
vStatus := val.LookupPath(cue.ParsePath(DefaultExportValue))
errStatus := vStatus.Err()
vExport := val.LookupPath(cue.ParsePath(KeyWordExport))
errExport := vExport.Err()
if errStatus != nil && errExport != nil {
return errors.Errorf("no `status` or `export` field found in view: %v, %v", errStatus, errExport)
}
if errStatus == nil {
_, errStatus = sets.ToString(vStatus)
}
if errExport == nil {
_, errExport = sets.ToString(vExport)
}
if errStatus != nil && errExport != nil {
return errors.Errorf("connot get string from` status` or `export`: %v, %v", errStatus, errExport)
if !vStatus.Exists() && !vExport.Exists() {
return errors.Errorf("no `status` or `export` field found in view")
}
return nil

View File

@@ -195,11 +195,11 @@ func NewVersionListCommand(ioStream util.IOStreams) *cobra.Command {
cmd := &cobra.Command{
Use: "list",
Short: "List all available versions",
Long: "Query all available versions from remote server.",
Long: "Query all available versions from remote server, compared to your current installed version.",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
helmHelper := helm.NewHelper()
versions, err := helmHelper.ListVersions(LegacyKubeVelaInstallerHelmRepoURL, kubeVelaChartName, true, nil)
versions, err := helmHelper.ListVersions(KubeVelaInstallerHelmRepoURL, kubeVelaChartName, true, nil)
if err != nil {
return err
}