Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit d95381a

Browse files
authored
Merge pull request #2210 from njhale/events-create-with-appspec
Capture app spec in AppCreate event details
2 parents eee0285 + c72d944 commit d95381a

File tree

1 file changed

+4
-0
lines changed
  • pkg/server/registry/apigroups/acorn/apps

1 file changed

+4
-0
lines changed

pkg/server/registry/apigroups/acorn/apps/events.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ const (
2525
type AppSpecCreateEventDetails struct {
2626
// ResourceVersion is the resourceVersion of the App created.
2727
ResourceVersion string `json:"resourceVersion"`
28+
29+
// Spec is the spec of the App that was created.
30+
Spec v1.AppInstanceSpec `json:"spec"`
2831
}
2932

3033
// AppSpecDeleteEventDetails captures additional info about the deletion of an App.
@@ -68,6 +71,7 @@ func (s *eventRecordingStrategy) Create(ctx context.Context, obj types.Object) (
6871

6972
details, err := apiv1.Mapify(AppSpecCreateEventDetails{
7073
ResourceVersion: created.GetResourceVersion(),
74+
Spec: created.(*apiv1.App).Spec,
7175
})
7276
if err != nil {
7377
logrus.Warnf("Failed to generate event details, event recording disabled for request: %s", err.Error())

0 commit comments

Comments
 (0)