Skip to content

Commit d0d04cc

Browse files
committed
Tabs -> spaces
Signed-off-by: Flynn <[email protected]>
1 parent e10331f commit d0d04cc

File tree

1 file changed

+96
-96
lines changed

1 file changed

+96
-96
lines changed

geps/gep-3949/index.md

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -290,52 +290,52 @@ is a significant barrier to mesh adoption.
290290
```go
291291
// Mesh is a Cluster level resource.
292292
type Mesh struct {
293-
metav1.TypeMeta `json:",inline"`
294-
metav1.ObjectMeta `json:"metadata,omitempty"`
295-
296-
// Spec defines the desired state of Mesh.
297-
Spec MeshSpec `json:"spec"`
298-
299-
// Status defines the current state of Mesh.
300-
//
301-
// Implementations MUST populate status on all Mesh resources which
302-
// specify their controller name.
303-
//
304-
// Defaults to Accepted condition with status Unknown and reason Pending.
305-
Status MeshStatus `json:"status,omitempty"`
293+
metav1.TypeMeta `json:",inline"`
294+
metav1.ObjectMeta `json:"metadata,omitempty"`
295+
296+
// Spec defines the desired state of Mesh.
297+
Spec MeshSpec `json:"spec"`
298+
299+
// Status defines the current state of Mesh.
300+
//
301+
// Implementations MUST populate status on all Mesh resources which
302+
// specify their controller name.
303+
//
304+
// Defaults to Accepted condition with status Unknown and reason Pending.
305+
Status MeshStatus `json:"status,omitempty"`
306306
}
307307

308308
// MeshSpec defines the desired state of a Mesh.
309309
type MeshSpec struct {
310-
// ControllerName is the name of the controller that is managing this
311-
// Mesh. The value of this field MUST be a domain prefixed path.
312-
//
313-
// Example: "example.com/awesome-mesh".
314-
//
315-
// This field is not mutable and cannot be empty.
316-
//
317-
// Support: Core
318-
//
319-
// +kubebuilder:validation:XValidation:message="Value is immutable",rule="self == oldSelf"
320-
ControllerName string `json:"controllerName"`
321-
322-
// ParametersRef is an optional reference to a resource that contains
310+
// ControllerName is the name of the controller that is managing this
311+
// Mesh. The value of this field MUST be a domain prefixed path.
312+
//
313+
// Example: "example.com/awesome-mesh".
314+
//
315+
// This field is not mutable and cannot be empty.
316+
//
317+
// Support: Core
318+
//
319+
// +kubebuilder:validation:XValidation:message="Value is immutable",rule="self == oldSelf"
320+
ControllerName string `json:"controllerName"`
321+
322+
// ParametersRef is an optional reference to a resource that contains
323323
// implementation-specific for this Mesh. If no implementation-specific
324324
// parameters are needed, this field MUST be omitted.
325-
//
326-
// ParametersRef can reference a standard Kubernetes resource, i.e.
325+
//
326+
// ParametersRef can reference a standard Kubernetes resource, i.e.
327327
// ConfigMap, or an implementation-specific custom resource. The resource
328328
// can be cluster-scoped or namespace-scoped.
329-
//
330-
// If the referent cannot be found, refers to an unsupported kind, or when
331-
// the data within that resource is malformed, the Mesh MUST be rejected
329+
//
330+
// If the referent cannot be found, refers to an unsupported kind, or when
331+
// the data within that resource is malformed, the Mesh MUST be rejected
332332
// with the "Accepted" status condition set to "False" and an
333-
// "InvalidParameters" reason.
334-
//
335-
// Support: Implementation-specific
336-
//
337-
// +optional
338-
ParametersRef *ParametersReference `json:"parametersRef,omitempty"`
333+
// "InvalidParameters" reason.
334+
//
335+
// Support: Implementation-specific
336+
//
337+
// +optional
338+
ParametersRef *ParametersReference `json:"parametersRef,omitempty"`
339339
}
340340

341341
// MeshConditionType is the type for status conditions on Mesh resources.
@@ -347,79 +347,79 @@ type MeshConditionType string
347347
type MeshConditionReason string
348348

349349
const (
350-
// This condition indicates whether the Mesh has been accepted by the
351-
// controller requested in the `spec.controller` field.
352-
//
353-
// This condition defaults to Unknown, and MUST be set by a controller
350+
// This condition indicates whether the Mesh has been accepted by the
351+
// controller requested in the `spec.controller` field.
352+
//
353+
// This condition defaults to Unknown, and MUST be set by a controller
354354
// when it sees a Mesh using its controller string. The status of this
355-
// condition MUST be set to True if the controller will accept the Mesh
355+
// condition MUST be set to True if the controller will accept the Mesh
356356
// resource. Otherwise, this status MUST be set to False. If the status
357357
// is set to False, the controller MUST set a Message and Reason as an
358358
// explanation.
359-
//
360-
// Possible reasons for this condition to be true are:
361-
//
362-
// * "Accepted"
363-
//
364-
// Possible reasons for this condition to be False are:
365-
//
366-
// * "InvalidParameters"
367-
//
368-
// Controllers should prefer to use the values of MeshConditionReason
369-
// for the corresponding Reason, where appropriate.
370-
MeshConditionStatusAccepted MeshConditionType = "Accepted"
371-
372-
// This reason is used with the "Accepted" condition when the condition is
373-
// true.
374-
MeshConditionReasonAccepted MeshConditionReason = "Accepted"
375-
376-
// This reason is used with the "Accepted" condition when the Mesh
377-
// was not accepted because the parametersRef field refers to
378-
// * a namespaced resource but the Namespace field is not set, or
379-
// * a cluster-scoped resource but the Namespace field is set, or
380-
// * a nonexistent object, or
381-
// * an unsupported resource or kind, or
382-
// * an existing resource but the data within that resource is malformed.
383-
MeshConditionReasonInvalidParameters MeshConditionReason = "InvalidParameters"
384-
385-
// This reason is used with the "Accepted" condition when the
386-
// requested controller has not yet made a decision about whether
387-
// to accept the Mesh. It is the default Reason on a new Mesh.
388-
MeshConditionReasonPending MeshConditionReason = "Pending"
359+
//
360+
// Possible reasons for this condition to be true are:
361+
//
362+
// * "Accepted"
363+
//
364+
// Possible reasons for this condition to be False are:
365+
//
366+
// * "InvalidParameters"
367+
//
368+
// Controllers should prefer to use the values of MeshConditionReason
369+
// for the corresponding Reason, where appropriate.
370+
MeshConditionStatusAccepted MeshConditionType = "Accepted"
371+
372+
// This reason is used with the "Accepted" condition when the condition is
373+
// true.
374+
MeshConditionReasonAccepted MeshConditionReason = "Accepted"
375+
376+
// This reason is used with the "Accepted" condition when the Mesh
377+
// was not accepted because the parametersRef field refers to
378+
// * a namespaced resource but the Namespace field is not set, or
379+
// * a cluster-scoped resource but the Namespace field is set, or
380+
// * a nonexistent object, or
381+
// * an unsupported resource or kind, or
382+
// * an existing resource but the data within that resource is malformed.
383+
MeshConditionReasonInvalidParameters MeshConditionReason = "InvalidParameters"
384+
385+
// This reason is used with the "Accepted" condition when the
386+
// requested controller has not yet made a decision about whether
387+
// to accept the Mesh. It is the default Reason on a new Mesh.
388+
MeshConditionReasonPending MeshConditionReason = "Pending"
389389
)
390390

391391
// MeshStatus is the current status for the Mesh.
392392
type MeshStatus struct {
393-
// Conditions is the current status from the controller for
394-
// this Mesh.
395-
//
396-
// Controllers should prefer to publish conditions using values
397-
// of MeshConditionType for the type of each Condition.
398-
//
399-
// +optional
400-
// +listType=map
401-
// +listMapKey=type
402-
// +kubebuilder:validation:MaxItems=8
403-
// +kubebuilder:default={{type: "Accepted", status: "Unknown", message: "Waiting for controller", reason: "Pending", lastTransitionTime: "1970-01-01T00:00:00Z"}}
404-
Conditions []metav1.Condition `json:"conditions,omitempty"`
405-
406-
// SupportedFeatures is the set of features the Mesh support.
407-
// It MUST be sorted in ascending alphabetical order by the Name key.
408-
// +optional
409-
// +listType=map
410-
// +listMapKey=name
411-
// <gateway:experimental>
412-
// +kubebuilder:validation:MaxItems=64
413-
SupportedFeatures []SupportedFeature `json:"supportedFeatures,omitempty"`
393+
// Conditions is the current status from the controller for
394+
// this Mesh.
395+
//
396+
// Controllers should prefer to publish conditions using values
397+
// of MeshConditionType for the type of each Condition.
398+
//
399+
// +optional
400+
// +listType=map
401+
// +listMapKey=type
402+
// +kubebuilder:validation:MaxItems=8
403+
// +kubebuilder:default={{type: "Accepted", status: "Unknown", message: "Waiting for controller", reason: "Pending", lastTransitionTime: "1970-01-01T00:00:00Z"}}
404+
Conditions []metav1.Condition `json:"conditions,omitempty"`
405+
406+
// SupportedFeatures is the set of features the Mesh support.
407+
// It MUST be sorted in ascending alphabetical order by the Name key.
408+
// +optional
409+
// +listType=map
410+
// +listMapKey=name
411+
// <gateway:experimental>
412+
// +kubebuilder:validation:MaxItems=64
413+
SupportedFeatures []SupportedFeature `json:"supportedFeatures,omitempty"`
414414
}
415415

416416
// +kubebuilder:object:root=true
417417

418418
// MeshList contains a list of Mesh
419419
type MeshList struct {
420-
metav1.TypeMeta `json:",inline"`
421-
metav1.ListMeta `json:"metadata,omitempty"`
422-
Items []Mesh `json:"items"`
420+
metav1.TypeMeta `json:",inline"`
421+
metav1.ListMeta `json:"metadata,omitempty"`
422+
Items []Mesh `json:"items"`
423423
}
424424
```
425425

0 commit comments

Comments
 (0)