Compare commits

...

4 Commits

3 changed files with 4 additions and 13 deletions

View File

@@ -170,7 +170,7 @@ spec:
priorityClassName: "system-cluster-critical"
containers:
- name: app-service
image: beclab/app-service:0.4.70
image: beclab/app-service:0.4.72
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0

View File

@@ -2,7 +2,6 @@ package appinstaller
import (
"encoding/json"
"fmt"
"time"
appv1alpha1 "github.com/beclab/Olares/framework/app-service/api/app.bytetrade.io/v1alpha1"
@@ -12,7 +11,6 @@ import (
"github.com/beclab/Olares/framework/app-service/pkg/helm"
"github.com/beclab/Olares/framework/app-service/pkg/users/userspace"
apputils "github.com/beclab/Olares/framework/app-service/pkg/utils/app"
helmrelease "helm.sh/helm/v3/pkg/release"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
@@ -23,15 +21,7 @@ import (
// Upgrade do a upgrade operation for release.
func (h *HelmOps) Upgrade() error {
status, err := h.status()
if err != nil {
klog.Errorf("get release status failed %v", err)
return err
}
if status.Info.Status == helmrelease.StatusDeployed {
return h.upgrade()
}
return fmt.Errorf("cannot upgrade release %s/%s, current state is %s", h.app.Namespace, h.app.AppName, status.Info.Status)
return h.upgrade()
}
func (h *HelmOps) upgrade() error {

View File

@@ -87,7 +87,8 @@ func UpgradeCharts(ctx context.Context, actionConfig *action.Configuration, sett
client.Namespace = namespace
client.Timeout = 300 * time.Second
client.Recreate = false
client.Atomic = true
// Do not use Atomic, this could cause helm wait all resource ready.
//client.Atomic = true
if reuseValue {
client.ReuseValues = true
}