Skip to content

Commit 16ac89e

Browse files
Merge pull request #98 from codefresh-io/CR-12110
2 parents bc6ce95 + 9004e64 commit 16ac89e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.4-cap-CR-report-app-event
1+
2.3.4-cap-CR-12110-helm-resources-yaml

server/application/application_event_reporter.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)