mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
Feat: upgrade cluster-gateway to use v1.8.0-alpha.3 & fix time metrics bug (#5593)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
This commit is contained in:
@@ -112,7 +112,7 @@ helm install --create-namespace -n vela-system kubevela kubevela/vela-core --wai
|
||||
| `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.7.0` |
|
||||
| `multicluster.clusterGateway.image.tag` | ClusterGateway image tag | `v1.8.0-alpha.3` |
|
||||
| `multicluster.clusterGateway.image.pullPolicy` | ClusterGateway image pull policy | `IfNotPresent` |
|
||||
| `multicluster.clusterGateway.resources.limits.cpu` | ClusterGateway cpu limit | `100m` |
|
||||
| `multicluster.clusterGateway.resources.limits.memory` | ClusterGateway memory limit | `200Mi` |
|
||||
|
||||
@@ -150,7 +150,7 @@ multicluster:
|
||||
port: 9443
|
||||
image:
|
||||
repository: oamdev/cluster-gateway
|
||||
tag: v1.7.0
|
||||
tag: v1.8.0-alpha.3
|
||||
pullPolicy: IfNotPresent
|
||||
resources:
|
||||
limits:
|
||||
|
||||
@@ -290,7 +290,9 @@ func (r *Reconciler) stateKeep(logCtx monitorContext.Context, handler *AppHandle
|
||||
return
|
||||
}
|
||||
t := time.Now()
|
||||
defer metrics.AppReconcileStageDurationHistogram.WithLabelValues("state-keep").Observe(time.Since(t).Seconds())
|
||||
defer func() {
|
||||
metrics.AppReconcileStageDurationHistogram.WithLabelValues("state-keep").Observe(time.Since(t).Seconds())
|
||||
}()
|
||||
if err := handler.resourceKeeper.StateKeep(logCtx); err != nil {
|
||||
logCtx.Error(err, "Failed to run prevent-configuration-drift")
|
||||
r.Recorder.Event(app, event.Warning(velatypes.ReasonFailedStateKeep, err))
|
||||
|
||||
@@ -413,7 +413,9 @@ type garbageCollectFunc func(ctx context.Context, h *AppHandler) error
|
||||
// - clean up legacy component revisions
|
||||
func garbageCollection(ctx context.Context, h *AppHandler) error {
|
||||
t := time.Now()
|
||||
defer metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev").Observe(time.Since(t).Seconds())
|
||||
defer func() {
|
||||
metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev").Observe(time.Since(t).Seconds())
|
||||
}()
|
||||
collectFuncs := []garbageCollectFunc{
|
||||
garbageCollectFunc(cleanUpApplicationRevision),
|
||||
garbageCollectFunc(cleanUpWorkflowComponentRevision),
|
||||
|
||||
@@ -89,7 +89,9 @@ func (h *AppHandler) GenerateApplicationSteps(ctx monitorContext.Context,
|
||||
appRev *v1beta1.ApplicationRevision) (*wfTypes.WorkflowInstance, []wfTypes.TaskRunner, error) {
|
||||
|
||||
t := time.Now()
|
||||
defer metrics.AppReconcileStageDurationHistogram.WithLabelValues("generate-app-steps").Observe(time.Since(t).Seconds())
|
||||
defer func() {
|
||||
metrics.AppReconcileStageDurationHistogram.WithLabelValues("generate-app-steps").Observe(time.Since(t).Seconds())
|
||||
}()
|
||||
|
||||
appLabels := map[string]string{
|
||||
oam.LabelAppName: app.Name,
|
||||
|
||||
@@ -908,7 +908,9 @@ func cleanUpApplicationRevision(ctx context.Context, h *AppHandler) error {
|
||||
return nil
|
||||
}
|
||||
t := time.Now()
|
||||
defer metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev.apprev").Observe(time.Since(t).Seconds())
|
||||
defer func() {
|
||||
metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev.apprev").Observe(time.Since(t).Seconds())
|
||||
}()
|
||||
sortedRevision, err := GetSortedAppRevisions(ctx, h.r.Client, h.app.Name, h.app.Namespace)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -962,7 +964,9 @@ func cleanUpWorkflowComponentRevision(ctx context.Context, h *AppHandler) error
|
||||
return nil
|
||||
}
|
||||
t := time.Now()
|
||||
defer metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev.comprev").Observe(time.Since(t).Seconds())
|
||||
defer func() {
|
||||
metrics.AppReconcileStageDurationHistogram.WithLabelValues("gc-rev.comprev").Observe(time.Since(t).Seconds())
|
||||
}()
|
||||
// collect component revision in use
|
||||
compRevisionInUse := map[string]map[string]struct{}{}
|
||||
ctx = auth.ContextWithUserInfo(ctx, h.app)
|
||||
|
||||
Reference in New Issue
Block a user