Skip to content

Conversation

@gianlucam76
Copy link
Member

Before this PR, code was getting resources contained in the EventReports and using strings.Split to separate resources, which fails when a resource itself contains the --- separator.
A common example is a ConfigMap holding a certificate, which includes -----BEGIN CERTIFICATE----- within its data.

The fix replaces strings.Split with deployer.CustomSplit, a function designed to properly handle these cases by parsing the YAML structure without confusing internal content with resource delimiters.

Fixes #389

Before this PR, code was getting resources contained in the EventReports
and using strings.Split to separate resources, which fails when a resource
itself contains the `---` separator.
A common example is a ConfigMap holding a certificate, which includes
`-----BEGIN CERTIFICATE-----` within its data.

The fix replaces strings.Split with __deployer.CustomSplit__, a function
designed to properly handle these cases by parsing the YAML structure
without confusing internal content with resource delimiters.
@gianlucam76 gianlucam76 merged commit c2559f7 into projectsveltos:main Aug 10, 2025
6 checks passed
@gianlucam76 gianlucam76 deleted the bug branch August 10, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: EventTrigger fails with JSON parse error when processing EventReport resources field

1 participant