Skip to content

Commit 00a8061

Browse files
committed
Strip out dev notes from CRD schemas
1 parent d891ac6 commit 00a8061

File tree

6 files changed

+35
-244
lines changed

6 files changed

+35
-244
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ generate: ## Run go generate
126126
.PHONY: generate-crds
127127
generate-crds: ## Generate CRDs and Go types using kubebuilder
128128
go run sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) crd object paths=./apis/... output:crd:artifacts:config=config/crd/bases
129+
./scripts/strip-crd-excludes.sh config/crd/bases
129130
kubectl kustomize config/crd >deploy/crds.yaml
130131

131132
.PHONY: install-crds

config/crd/bases/gateway.nginx.org_clientsettingspolicies.yaml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -356,35 +356,6 @@ spec:
356356
description: |-
357357
Conditions describes the status of the Policy with respect to the given Ancestor.
358358
359-
<gateway:util:excludeFromCRD>
360-
361-
Notes for implementors:
362-
363-
Conditions are a listType `map`, which means that they function like a
364-
map with a key of the `type` field _in the k8s apiserver_.
365-
366-
This means that implementations must obey some rules when updating this
367-
section.
368-
369-
* Implementations MUST perform a read-modify-write cycle on this field
370-
before modifying it. That is, when modifying this field, implementations
371-
must be confident they have fetched the most recent version of this field,
372-
and ensure that changes they make are on that recent version.
373-
* Implementations MUST NOT remove or reorder Conditions that they are not
374-
directly responsible for. For example, if an implementation sees a Condition
375-
with type `special.io/SomeField`, it MUST NOT remove, change or update that
376-
Condition.
377-
* Implementations MUST always _merge_ changes into Conditions of the same Type,
378-
rather than creating more than one Condition of the same Type.
379-
* Implementations MUST always update the `observedGeneration` field of the
380-
Condition to the `metadata.generation` of the Gateway at the time of update creation.
381-
* If the `observedGeneration` of a Condition is _greater than_ the value the
382-
implementation knows about, then it MUST NOT perform the update on that Condition,
383-
but must wait for a future reconciliation and status update. (The assumption is that
384-
the implementation's copy of the object is stale and an update will be re-triggered
385-
if relevant.)
386-
387-
</gateway:util:excludeFromCRD>
388359
items:
389360
description: Condition contains details for one aspect of
390361
the current state of this API Resource.

config/crd/bases/gateway.nginx.org_observabilitypolicies.yaml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -382,35 +382,6 @@ spec:
382382
description: |-
383383
Conditions describes the status of the Policy with respect to the given Ancestor.
384384
385-
<gateway:util:excludeFromCRD>
386-
387-
Notes for implementors:
388-
389-
Conditions are a listType `map`, which means that they function like a
390-
map with a key of the `type` field _in the k8s apiserver_.
391-
392-
This means that implementations must obey some rules when updating this
393-
section.
394-
395-
* Implementations MUST perform a read-modify-write cycle on this field
396-
before modifying it. That is, when modifying this field, implementations
397-
must be confident they have fetched the most recent version of this field,
398-
and ensure that changes they make are on that recent version.
399-
* Implementations MUST NOT remove or reorder Conditions that they are not
400-
directly responsible for. For example, if an implementation sees a Condition
401-
with type `special.io/SomeField`, it MUST NOT remove, change or update that
402-
Condition.
403-
* Implementations MUST always _merge_ changes into Conditions of the same Type,
404-
rather than creating more than one Condition of the same Type.
405-
* Implementations MUST always update the `observedGeneration` field of the
406-
Condition to the `metadata.generation` of the Gateway at the time of update creation.
407-
* If the `observedGeneration` of a Condition is _greater than_ the value the
408-
implementation knows about, then it MUST NOT perform the update on that Condition,
409-
but must wait for a future reconciliation and status update. (The assumption is that
410-
the implementation's copy of the object is stale and an update will be re-triggered
411-
if relevant.)
412-
413-
</gateway:util:excludeFromCRD>
414385
items:
415386
description: Condition contains details for one aspect of
416387
the current state of this API Resource.
@@ -876,35 +847,6 @@ spec:
876847
description: |-
877848
Conditions describes the status of the Policy with respect to the given Ancestor.
878849
879-
<gateway:util:excludeFromCRD>
880-
881-
Notes for implementors:
882-
883-
Conditions are a listType `map`, which means that they function like a
884-
map with a key of the `type` field _in the k8s apiserver_.
885-
886-
This means that implementations must obey some rules when updating this
887-
section.
888-
889-
* Implementations MUST perform a read-modify-write cycle on this field
890-
before modifying it. That is, when modifying this field, implementations
891-
must be confident they have fetched the most recent version of this field,
892-
and ensure that changes they make are on that recent version.
893-
* Implementations MUST NOT remove or reorder Conditions that they are not
894-
directly responsible for. For example, if an implementation sees a Condition
895-
with type `special.io/SomeField`, it MUST NOT remove, change or update that
896-
Condition.
897-
* Implementations MUST always _merge_ changes into Conditions of the same Type,
898-
rather than creating more than one Condition of the same Type.
899-
* Implementations MUST always update the `observedGeneration` field of the
900-
Condition to the `metadata.generation` of the Gateway at the time of update creation.
901-
* If the `observedGeneration` of a Condition is _greater than_ the value the
902-
implementation knows about, then it MUST NOT perform the update on that Condition,
903-
but must wait for a future reconciliation and status update. (The assumption is that
904-
the implementation's copy of the object is stale and an update will be re-triggered
905-
if relevant.)
906-
907-
</gateway:util:excludeFromCRD>
908850
items:
909851
description: Condition contains details for one aspect of
910852
the current state of this API Resource.

config/crd/bases/gateway.nginx.org_upstreamsettingspolicies.yaml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -351,35 +351,6 @@ spec:
351351
description: |-
352352
Conditions describes the status of the Policy with respect to the given Ancestor.
353353
354-
<gateway:util:excludeFromCRD>
355-
356-
Notes for implementors:
357-
358-
Conditions are a listType `map`, which means that they function like a
359-
map with a key of the `type` field _in the k8s apiserver_.
360-
361-
This means that implementations must obey some rules when updating this
362-
section.
363-
364-
* Implementations MUST perform a read-modify-write cycle on this field
365-
before modifying it. That is, when modifying this field, implementations
366-
must be confident they have fetched the most recent version of this field,
367-
and ensure that changes they make are on that recent version.
368-
* Implementations MUST NOT remove or reorder Conditions that they are not
369-
directly responsible for. For example, if an implementation sees a Condition
370-
with type `special.io/SomeField`, it MUST NOT remove, change or update that
371-
Condition.
372-
* Implementations MUST always _merge_ changes into Conditions of the same Type,
373-
rather than creating more than one Condition of the same Type.
374-
* Implementations MUST always update the `observedGeneration` field of the
375-
Condition to the `metadata.generation` of the Gateway at the time of update creation.
376-
* If the `observedGeneration` of a Condition is _greater than_ the value the
377-
implementation knows about, then it MUST NOT perform the update on that Condition,
378-
but must wait for a future reconciliation and status update. (The assumption is that
379-
the implementation's copy of the object is stale and an update will be re-triggered
380-
if relevant.)
381-
382-
</gateway:util:excludeFromCRD>
383354
items:
384355
description: Condition contains details for one aspect of
385356
the current state of this API Resource.

0 commit comments

Comments
 (0)