Skip to content

Commit bf42ed0

Browse files
committed
Remove example Go code from condition descriptions
Also remove a blank line from the switchover description that caused trailing spaces in API documentation.
1 parent 1ac7922 commit bf42ed0

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

build/crd/condition.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PostgresCluster "v1beta1" is in "/spec/versions/0"
2+
3+
- op: add
4+
path: /spec/versions/0/schema/openAPIV3Schema/properties/status/properties/conditions/items/description
5+
value: Condition contains details for one aspect of the current state of this API Resource.
6+
- op: add
7+
path: /spec/versions/0/schema/openAPIV3Schema/properties/status/properties/conditions/items/properties/type/description
8+
value: type of condition in CamelCase.

build/crd/kustomization.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ patchesJson6902:
1010
version: v1
1111
kind: CustomResourceDefinition
1212
name: postgresclusters.postgres-operator.crunchydata.com
13-
path: validation.yaml
13+
path: condition.yaml
1414
- target:
1515
group: apiextensions.k8s.io
1616
version: v1
1717
kind: CustomResourceDefinition
1818
name: postgresclusters.postgres-operator.crunchydata.com
1919
path: todos.yaml
20+
- target:
21+
group: apiextensions.k8s.io
22+
version: v1
23+
kind: CustomResourceDefinition
24+
name: postgresclusters.postgres-operator.crunchydata.com
25+
path: validation.yaml

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

+8-20
Original file line numberDiff line numberDiff line change
@@ -5151,14 +5151,14 @@ spec:
51515151
type: string
51525152
type:
51535153
default: switchover
5154-
description: "Type allows you to specify the type of Patroni
5154+
description: 'Type allows you to specify the type of Patroni
51555155
switchover that will be performed. `patronictl` supports
51565156
both `switchovers` and `failovers` where a `failover` is
5157-
effectively a \"forced switchover\". The main difference
5158-
is that `failover` can be used when there is not currently
5157+
effectively a "forced switchover". The main difference is
5158+
that `failover` can be used when there is not currently
51595159
a leader. A TargetInstance must be specified to failover.
5160-
\n NOTE: The switchover type failover is reserved as the
5161-
\"last resort\" case."
5160+
NOTE: The switchover type failover is reserved as the "last
5161+
resort" case.'
51625162
enum:
51635163
- switchover
51645164
- failover
@@ -7592,16 +7592,8 @@ spec:
75927592
current state. Known .status.conditions.type are: "PersistentVolumeResizing",
75937593
"ProxyAvailable"'
75947594
items:
7595-
description: "Condition contains details for one aspect of the current
7596-
state of this API Resource. --- This struct is intended for direct
7597-
use as an array at the field path .status.conditions. For example,
7598-
type FooStatus struct{ // Represents the observations of a
7599-
foo's current state. // Known .status.conditions.type are:
7600-
\"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type
7601-
\ // +patchStrategy=merge // +listType=map // +listMapKey=type
7602-
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"
7603-
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`
7604-
\n // other fields }"
7595+
description: Condition contains details for one aspect of the current
7596+
state of this API Resource.
76057597
properties:
76067598
lastTransitionTime:
76077599
description: lastTransitionTime is the last time the condition
@@ -7643,11 +7635,7 @@ spec:
76437635
- Unknown
76447636
type: string
76457637
type:
7646-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
7647-
--- Many .condition.type values are consistent across resources
7648-
like Available, but because arbitrary conditions can be useful
7649-
(see .node.status.conditions), the ability to deconflict is
7650-
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
7638+
description: type of condition in CamelCase.
76517639
maxLength: 316
76527640
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
76537641
type: string

docs/content/references/crd.md

+3-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/postgres-operator.crunchydata.com/v1beta1/patroni_types.go

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ type PatroniSwitchover struct {
8383
// effectively a "forced switchover". The main difference is that `failover` can be
8484
// used when there is not currently a leader. A TargetInstance must be specified to
8585
// failover.
86-
//
8786
// NOTE: The switchover type failover is reserved as the "last resort" case.
8887
// +kubebuilder:validation:Enum={switchover,failover}
8988
// +kubebuilder:default:=switchover

0 commit comments

Comments
 (0)