File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- 2.3.4-cap-CR-report-app-event
1+ 2.3.4-cap-CR-12110-helm-resources-yaml
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
1616 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1717 "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
1818 "k8s.io/apimachinery/pkg/watch"
19+ "sigs.k8s.io/yaml"
1920
2021 "github.com/argoproj/argo-cd/v2/pkg/apiclient/application"
2122 "github.com/argoproj/argo-cd/v2/pkg/apiclient/events"
@@ -354,6 +355,14 @@ func getResourceEventPayload(
354355 errors = append (errors , parseResourceSyncResultErrors (rs , a .Status .OperationState )... )
355356 }
356357
358+ if len (desiredState .RawManifest ) == 0 && len (desiredState .CompiledManifest ) != 0 {
359+ // for handling helm defined resources, etc...
360+ y , err := yaml .JSONToYAML ([]byte (desiredState .CompiledManifest ))
361+ if err == nil {
362+ desiredState .RawManifest = string (y )
363+ }
364+ }
365+
357366 source := events.ObjectSource {
358367 DesiredManifest : desiredState .CompiledManifest ,
359368 ActualManifest : actualState .Manifest ,
You can’t perform that action at this time.
0 commit comments