Conventions
Implementation, history and tests of the sections on the reference page Conventions. Text in square brackets is added here to say what a moved sentence refers to.
Conventions
- History:
- go-kure/launcher#396
[“the maps themselves”, at the end of the reference’s sentence on the
postgresqlCluster’sspec.inheritedMetadata.]
- go-kure/launcher#396
[“the maps themselves”, at the end of the reference’s sentence on the
The app label
- History:
- go-kure/launcher#572 [named after “a 10-hex-character sha256 digest” in the reference’s second paragraph.]
- go-kure/launcher#788 [named after “where the key is absent” in the reference’s paragraph on the component label.]
- go-kure/launcher#790 [named after “refused when it is generated” in the same paragraph.]
The object name (objectName)
- Implementation:
ComponentObject, inobject_name.goor, for a kind added since, in the kind’s own file [“every type whose handler declares its object”, in the paragraph “The property is not in any handler’sPropertySchema”.]
- History:
- go-kure/launcher#787 [named after “in place of the component name” in the reference’s first paragraph.]
The object’s labels and annotations (labels, annotations)
- History:
- go-kure/launcher#790 [named after “each a map of strings” in the reference’s first paragraph.]
- Tests:
TestObjectMetadata_EveryKindComponentTakesItholds every registered kind to the two properties, so a kind added later cannot ship without them. [“the two properties” arelabelsandannotations.]
The pod template’s labels and annotations (podMetadata)
- History:
- go-kure/launcher#1178 [named after “own metadata” in the reference’s first paragraph.]
- go-kure/launcher#1216
[named after “
webserviceandworkertake it too” in the same paragraph.]
A label selector’s match expressions
- History:
- go-kure/launcher#790 [named after “each named by its path” in the reference’s first paragraph.]
- Tests:
TestValidateLabelSelector_MatchesAPIMachineryholds launcher’s check to the linked function on those three. [“the linked function” isValidateLabelSelectorRequirementofk8s.io/apimachinery, named in the reference’s paragraph before; “those three” are the three defects the reference lists.]TestExternalSecretsKinds_RequiredMatchSourcederives the two from that source by that rule, beside the fields the operator’s own types mark required, and holds each kind’s list to them. [“the two” arekeyandoperator; “that source” and “that rule” are the linkedmetav1.LabelSelectorRequirementand the schema generators’ rule, both in the reference’s paragraph “The Prometheus operator’s module, …”.]
Required fields a kind writes unauthored and does not refuse
- Implementation:
scripts/vendor-prometheus-operator-gates.sh[aftertestdata/upstream/prometheus-operator/in the reference’s first vendored-CRD bullet.]scripts/forbidden-terms-lib.sh, self-tested bymake test-forbidden-terms[after “the script reads the guard’s own matcher” in the second bullet.]
- History:
- go-kure/launcher#1108
[named after
mise run vendor-external-secrets-crds vX.Y.Zin the third bullet.] - Before go-kure/launcher#883 generated their lists, the same was shown of
imageCatalogRefoncnpg-clusterandpgbouncer.imageCatalogRefoncnpg-pooler: akindwritten""refused by the CRD’s own rule on the reference, anamewritten""and amajorwritten0accepted. All three are refused now. [“the same” is what the reference’s paragraph “What the API server makes of them” shows of the Pooler and the Prometheus operator kinds.] - go-kure/launcher#1108 [named after “on their vendored CRDs” in the reference’s paragraph “At this pin the file holds 25 members …”.]
- go-kure/launcher#1108
[named after
- Tests:
TestRequiredWrittenKinds_CoverEveryCRDKindholds the measured kinds to the kind inventory: everykindrow whose API group client-go’s scheme does not register, so a CRD serves it, is measured or named as not measured with its reason, so a new kind component of such an API fails there until it is one or the other. [“there” is that test; it follows the reference’s sentence onapiservice.]
Required fields the published schema carries
- Implementation:
publishNestedRequired,unconditionalPaths,handRefusedRequiredandnestedRequiredTypesinpkg/oam/builtin/components/kind_required_schema.go; each of the 31 kinds’PropertySchema()returns its schema throughpublishNestedRequired(28 wrap theirdeclaredSchema();cnpg-backupand the two image catalog kinds wrap their shared schema helper); so do the five mariadb kinds, of which onlymariadb-sqljobhas an unconditional path today (passwordSecretKeyRef.key), the other four being wrapped so a regenerated list publishes theirs [the 31 are the generated kinds with an unconditional path the schema did not carry and the eight kinds ofhandRefusedRequired; the mariadb kinds were added after that measurement.]
- History:
- go-kure/launcher#1831 [the issue that named the gap; its first table was one refusal per type from a test run, and the set it names is the one measured against the generated lists.]
- Tests:
TestKindSchemas_PublishNestedRequiredholds every unconditional generated path and every hand-refused path to a declared,Requirednode of the published schema.TestHandRefusedRequired_RefusedByBuildholds eachhandRefusedRequiredentry to the kind’s refusal of the document without it, so a path the build stops refusing fails there.TestNestedRequiredTypes_MatchTheAPIholds each typenestedRequiredTypesdeclares to the type the kind’s API gives the field.TestCnpgPooler_OmittedClusterNameFailsSchemashows the refusal at schema validation.TestCnpgPooler_NestedKeyIsReadByExactSpellingpins that the schema reads a nested key by its exact spelling, as it does at the top level. It checks the refusal text of each case, so a case cannot pass for an unrelated reason.
Every spec field is this package’s to write
- Implementation:
common.go["ValidateImageRef", in the reference’s paragraph “Two injected defaults are gone from the emitted manifests”.]- The
obj.Annotations = nilassignments scattered through the handlers, which existed to strip theapp:annotation the constructors used to stamp, are now no-ops — kept so the field stays at a known value regardless of what a future constructor does. [“the constructors” are theCreate<Kind>constructors of the reference’s first paragraph.]
- History:
- its
plugin name and parameters were corrected afterwards by go-kure/launcher#643
[“the barman-cloud WAL-archiver plugin entry”, in the reference’s paragraph “
postgresqlwrites every CNPG value itself”.]
- its
plugin name and parameters were corrected afterwards by go-kure/launcher#643
[“the barman-cloud WAL-archiver plugin entry”, in the reference’s paragraph “