Skip to content

feat: populate LabelConfig with resource-specific label queries#53

Merged
JeroenSoeters merged 2 commits into
mainfrom
feat/label-config-overrides
Apr 18, 2026
Merged

feat: populate LabelConfig with resource-specific label queries#53
JeroenSoeters merged 2 commits into
mainfrom
feat/label-config-overrides

Conversation

@JeroenSoeters

Copy link
Copy Markdown
Contributor

Summary

Salvages the LabelConfig piece from the stale #20, ported to model.LabelConfig (main moved these types from pkg/pluginpkg/model after #20 was opened).

  • Default query: \$.DisplayName (works for VCN, Subnet, Volume, VirtualNodePool, …)
  • Overrides to \$.Name for Compartment, Policy, Cluster, NodePool, Bucket — these resources expose a `Name` property instead of `DisplayName`.

Without this, discovered resources fall back to their OCID as the label.

Test plan

  • `go build ./...`
  • `go test ./...`
  • Discover an OCI Bucket / Compartment and verify the label is the resource name, not the OCID

Most OCI resources expose a human-readable name via DisplayName — set
that as the default. Compartment, Policy, Cluster, NodePool, and Bucket
use Name instead, so override those.

Without this, discovered resources fall back to their OCID as the label,
which is opaque.
@JeroenSoeters JeroenSoeters merged commit 39b8490 into main Apr 18, 2026
9 checks passed
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.

1 participant