I'm a big Kubernetes / GitOps fan and I'm pretty used to the YAML format to describe a Kubernetes object (manifests).
The concept:
apiVersion: apps/v1 # A reference to some known schema
kind: Deployment # A subpart of the schema
metadata:
name: some-name
description: The keys under metadata also adhere to some schema, at least in Kubernetes manifests
annotations:
some-key: some-value
spec:
key1: this whole object will adhere to the scheme referenced by apiVersion and kind (line 1 and 2)
key2: the file is invalid if it's not
Sometimes I see the format being used in other places/contexts. See for example the backstage content description. A different context that is not related to Kubernetes resources. And obviously, it's a nice and recognizable way to have some typing in your YAML files.
Is there a name for this concept or someplace where it is being described more formally? I remember reading that this was some internal standard from Google long before Kubernetes.
Found 'names' so far:
Finnaly found it! The original Kubernetes lead architect wrote a recent article about this: https://itnext.io/on-using-the-kubernetes-resource-model-for-declarative-configuration-a5dd11b99546
The short answer: he called it a KRM Spec. But the whole background in why it's so similar to the API design makes this so powerful and interesting.