NickLarsenNZ / NickLarsenNZ/cool-diff

Reusable nested MatchConfigs

Open
#23 1 comment 0 reactions 1 assignee View on GitHub

@NickLarsenNZ is already working on this.

Since Jul 3, 2026.

enhancement
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In the OpenApi spec for the well-known Kubernetes kinds there are reusable components that can be referenced via $ref.

Instead of duplicating parts of MatchConfigs for each kind, we could refer to components.

For example (removing the long names to keep it brief), Pod kind has PodSpec as a component. StatefulSet and Deployment (among others) refer back to PodSpec. As would some CRDs.

# io.k8s.api.core.v1.Pod
properties:
  spec:
    allOf:
      - $ref: '#/components/schemas/io.k8s.api.core.v1.PodSpec'
    default: {}

# ...and the component it points at, defined once:
io.k8s.api.core.v1.PodSpec:
  properties:
    containers:
      type: array
      x-kubernetes-list-type: map
      x-kubernetes-list-map-keys: [name]
      items:
        allOf:
          - $ref: '#/components/schemas/io.k8s.api.core.v1.Container'

Find a way to drop hints for reusable parts. Needs a little investigation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.