Skip to content

Apply compound (kind, name) listMapKey to MCPOIDCConfig and MCPExternalAuthConfig ReferencingWorkloads #5498

Closed

Description

@ChrisJBurns

Summary

In #4777 the ReferencingWorkloads field on `MCPAuthzConfigStatus` was changed from `+listMapKey=name` to a compound `+listMapKey=kind` + `+listMapKey=name` so two workloads of different kinds with the same name no longer collide under merge-patch semantics (commit 193ff756).

The two sibling config types — `MCPOIDCConfigStatus.ReferencingWorkloads` and `MCPExternalAuthConfigStatus.ReferencingWorkloads` — share the same `WorkloadReference` type and have the same single-key listMapKey. They need the same fix for parity.

Refs:

Scope

In both files:

  • `cmd/thv-operator/api/v1beta1/mcpoidcconfig_types.go`
  • `cmd/thv-operator/api/v1beta1/mcpexternalauthconfig_types.go`

Change the field markers from:

```go
// +listType=map
// +listMapKey=name
```

to:

```go
// +listType=map
// +listMapKey=kind
// +listMapKey=name
```

Then regenerate:

```bash
task operator-generate
task operator-manifests
task crdref-gen
```

Acceptance criteria

  • Both sibling types declare the compound `+listMapKey=kind` + `+listMapKey=name` on `ReferencingWorkloads`.
  • `task operator-manifests` regenerates the CRD YAML with `x-kubernetes-list-map-keys: [kind, name]` for both.
  • `task test` passes; no regression in either controller's reconcile path.

Compatibility note

This is technically a CRD schema change. Existing clusters with stored `ReferencingWorkloads` entries are unaffected at the data level — the entries already contain both `kind` and `name`. The change only tightens the apiserver's merge-patch interpretation going forward.

Activity

  1. added
    enhancement
    on Jun 11, 2026
  2. added
    needs-triage
    go
    kubernetes
    api
    and removed
    needs-triage
    on Jun 11, 2026
  3. added a commit that references this issue on Jun 12, 2026
    4e337ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apienhancementgokubernetesoperator

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions