Skip to content

Parse YAML for CRD identification#134

Merged
mclasmeier merged 2 commits into
mainfrom
mc/crd-identify
May 5, 2026
Merged

Parse YAML for CRD identification#134
mclasmeier merged 2 commits into
mainfrom
mc/crd-identify

Conversation

@mclasmeier
Copy link
Copy Markdown
Collaborator

@mclasmeier mclasmeier commented May 4, 2026

Addresses another TODO, doing proper YAML unmarshaling for identifying CRDs in the operator bundle.

Prerequisite for CI rollout.

Manual verification

Deployed the operator with roxie and it shows

01:05 Applying 3 CRD(s) to cluster
01:06 ✓ Successfully applied CRD config.stackrox.io_securitypolicies.yaml
01:08 ✓ Successfully applied CRD platform.stackrox.io_centrals.yaml
01:09 ✓ Successfully applied CRD platform.stackrox.io_securedclusters.yaml

So it still finds the correct CRD files.

@mclasmeier mclasmeier added the ci-rollout Marks a PR to be a prerequisite for rolling out roxie in stackrox CI. label May 5, 2026
@mclasmeier mclasmeier marked this pull request as ready for review May 5, 2026 11:29
@mclasmeier mclasmeier requested review from AlexVulaj and porridge May 5, 2026 11:29
Comment thread internal/deployer/operator.go
@mclasmeier mclasmeier merged commit 9729433 into main May 5, 2026
7 checks passed
@AlexVulaj AlexVulaj deleted the mc/crd-identify branch May 6, 2026 13:40
var meta struct {
Kind string `yaml:"kind"`
}
if err := yaml.Unmarshal(content, &meta); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that these files are sizes are rather large and that we only need a single string from them, would it make sense to use a streaming decoder that doesn't require allocating memory for the whole file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-rollout Marks a PR to be a prerequisite for rolling out roxie in stackrox CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants