зеркало из https://github.com/Azure/orkestra.git
Fix failure during update (#78)
Fixes #77 Signed-off-by: nitishm <nitishm@microsoft.com> Co-authored-by: nitishm <nitishm@microsoft.com>
This commit is contained in:
Родитель
f7f3ee7b1a
Коммит
384050211b
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/Azure/Orkestra/pkg/configurer"
|
||||
"github.com/Azure/Orkestra/pkg/registry"
|
||||
"github.com/Azure/Orkestra/pkg/workflow"
|
||||
v1 "github.com/fluxcd/helm-operator/pkg/apis/helm.fluxcd.io/v1"
|
||||
"github.com/go-logr/logr"
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
|
@ -92,6 +93,16 @@ func (r *ApplicationGroupReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e
|
|||
return ctrl.Result{Requeue: false}, nil
|
||||
}
|
||||
|
||||
v := orkestrav1alpha1.ApplicationGroup{}
|
||||
for _, app := range appGroup.Spec.Applications {
|
||||
app.Spec.Values = v1.HelmValues{
|
||||
Data: make(map[string]interface{}),
|
||||
}
|
||||
v.Spec.Applications = append(v.Spec.Applications, app)
|
||||
}
|
||||
|
||||
appGroup.Spec.Applications = v.DeepCopy().Spec.Applications
|
||||
|
||||
// Add finalizer if it doesnt already exist
|
||||
if appGroup.Finalizers == nil {
|
||||
appGroup.Finalizers = []string{finalizer}
|
||||
|
|
Загрузка…
Ссылка в новой задаче