Skip to content

Commit a0696fb

Browse files
committed
update docs
1 parent 86dc57e commit a0696fb

11 files changed

+39
-19
lines changed

api/v1alpha1/backendtrafficpolicy_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ type BackendTrafficPolicySpec struct {
2828
// The default strategy is round robin.
2929
LoadBalancer *LoadBalancer `json:"loadbalancer,omitempty" yaml:"loadbalancer,omitempty"`
3030
// Scheme is the protocol used to communicate with the upstream.
31+
// Default is `http`.
3132
// Can be one of `http`, `https`, `grpc`, or `grpcs`.
3233
// +kubebuilder:validation:Enum=http;https;grpc;grpcs;
3334
// +kubebuilder:default=http
@@ -43,6 +44,7 @@ type BackendTrafficPolicySpec struct {
4344

4445
// PassHost configures how the host header should be determined when a
4546
// request is forwarded to the upstream.
47+
// Default is `pass`.
4648
// Can be one of `pass`, `node` or `rewrite`.
4749
//
4850
// +kubebuilder:validation:Enum=pass;node;rewrite;
@@ -58,12 +60,14 @@ type BackendTrafficPolicySpec struct {
5860
// +kubebuilder:validation:XValidation:rule="!(has(self.key) && self.type != 'chash')"
5961
type LoadBalancer struct {
6062
// Type specifies the load balancing algorithms.
63+
// Default is `roundrobin`.
6164
// Can be one of `roundrobin`, `chash`, `ewma`, or `least_conn`.
6265
// +kubebuilder:validation:Enum=roundrobin;chash;ewma;least_conn;
6366
// +kubebuilder:default=roundrobin
6467
// +kubebuilder:validation:Required
6568
Type string `json:"type" yaml:"type"`
6669
// HashOn specified the type of field used for hashing, required when Type is `chash`.
70+
// Default is `vars`.
6771
// Can be one of `vars`, `header`, `cookie`, `consumer`, or `vars_combinations`.
6872
// +kubebuilder:validation:Enum=vars;header;cookie;consumer;vars_combinations;
6973
// +kubebuilder:default=vars

api/v1alpha1/consumer_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ type GatewayRef struct {
3131
// +kubebuilder:validation:Required
3232
// +kubebuilder:validation:MinLength=1
3333
Name string `json:"name"`
34-
// Kind is the type of Kubernetes object. Default to `Gateway`.
34+
// Kind is the type of Kubernetes object. Default is `Gateway`.
3535
// +kubebuilder:default=Gateway
3636
Kind *string `json:"kind,omitempty"`
37-
// Group is the API group the resource belongs to. Default to `gateway.networking.k8s.io`.
37+
// Group is the API group the resource belongs to. Default is `gateway.networking.k8s.io`.
3838
// +kubebuilder:default=gateway.networking.k8s.io
3939
Group *string `json:"group,omitempty"`
4040
// Namespace is namespace of the resource.

api/v1alpha1/gatewayproxy_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const (
5555
// GatewayProxyProvider defines the provider configuration for GatewayProxy.
5656
// +kubebuilder:validation:XValidation:rule="self.type == 'ControlPlane' ? has(self.controlPlane) : true",message="controlPlane must be specified when type is ControlPlane"
5757
type GatewayProxyProvider struct {
58-
// Type specifies the type of provider.
58+
// Type specifies the type of provider. Can only be `ControlPlane`.
5959
// +kubebuilder:validation:Required
6060
Type ProviderType `json:"type"`
6161

@@ -105,6 +105,7 @@ type AdminKeyValueFrom struct {
105105
// ControlPlaneAuth defines the authentication configuration for control plane.
106106
type ControlPlaneAuth struct {
107107
// Type specifies the type of authentication.
108+
// Can only be `AdminKey`.
108109
// +kubebuilder:validation:Required
109110
Type AuthType `json:"type"`
110111

api/v1alpha1/httproutepolicy_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type HTTPRoutePolicy struct {
4242
metav1.TypeMeta `json:",inline"`
4343
metav1.ObjectMeta `json:"metadata,omitempty"`
4444

45+
// HTTPRoutePolicySpec defines the defines the desired state and configuration of a HTTPRoutePolicy,
46+
// including route priority and request matching conditions.
4547
Spec HTTPRoutePolicySpec `json:"spec,omitempty"`
4648
Status PolicyStatus `json:"status,omitempty"`
4749
}

api/v1alpha1/pluginconfig_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ type PluginConfig struct {
1515
metav1.TypeMeta `json:",inline"`
1616
metav1.ObjectMeta `json:"metadata,omitempty"`
1717

18+
// PluginConfigSpec defines the desired state of a PluginConfig,
19+
// in which plugins and their configurations are specified.
1820
Spec PluginConfigSpec `json:"spec,omitempty"`
1921
}
2022

config/crd/bases/apisix.apache.org_backendtrafficpolicies.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ spec:
4949
default: vars
5050
description: |-
5151
HashOn specified the type of field used for hashing, required when Type is `chash`.
52+
Default is `vars`.
5253
Can be one of `vars`, `header`, `cookie`, `consumer`, or `vars_combinations`.
5354
enum:
5455
- vars
@@ -69,6 +70,7 @@ spec:
6970
default: roundrobin
7071
description: |-
7172
Type specifies the load balancing algorithms.
73+
Default is `roundrobin`.
7274
Can be one of `roundrobin`, `chash`, `ewma`, or `least_conn`.
7375
enum:
7476
- roundrobin
@@ -86,6 +88,7 @@ spec:
8688
description: |-
8789
PassHost configures how the host header should be determined when a
8890
request is forwarded to the upstream.
91+
Default is `pass`.
8992
Can be one of `pass`, `node` or `rewrite`.
9093
enum:
9194
- pass
@@ -101,6 +104,7 @@ spec:
101104
default: http
102105
description: |-
103106
Scheme is the protocol used to communicate with the upstream.
107+
Default is `http`.
104108
Can be one of `http`, `https`, `grpc`, or `grpcs`.
105109
enum:
106110
- http

config/crd/bases/apisix.apache.org_consumers.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ spec:
8383
group:
8484
default: gateway.networking.k8s.io
8585
description: Group is the API group the resource belongs to. Default
86-
to `gateway.networking.k8s.io`.
86+
is `gateway.networking.k8s.io`.
8787
type: string
8888
kind:
8989
default: Gateway
90-
description: Kind is the type of Kubernetes object. Default to
90+
description: Kind is the type of Kubernetes object. Default is
9191
`Gateway`.
9292
type: string
9393
name:

config/crd/bases/apisix.apache.org_gatewayproxies.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ spec:
103103
type: object
104104
type: object
105105
type:
106-
description: Type specifies the type of authentication.
106+
description: |-
107+
Type specifies the type of authentication.
108+
Can only be `AdminKey`.
107109
enum:
108110
- AdminKey
109111
type: string
@@ -126,7 +128,8 @@ spec:
126128
- endpoints
127129
type: object
128130
type:
129-
description: Type specifies the type of provider.
131+
description: Type specifies the type of provider. Can only be
132+
`ControlPlane`.
130133
enum:
131134
- ControlPlane
132135
type: string

config/crd/bases/apisix.apache.org_httproutepolicies.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ spec:
3737
metadata:
3838
type: object
3939
spec:
40-
description: HTTPRoutePolicySpec defines the desired state of HTTPRoutePolicy.
40+
description: |-
41+
HTTPRoutePolicySpec defines the defines the desired state and configuration of a HTTPRoutePolicy,
42+
including route priority and request matching conditions.
4143
properties:
4244
priority:
4345
description: Priority sets the priority for route. A higher value

config/crd/bases/apisix.apache.org_pluginconfigs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ spec:
3737
metadata:
3838
type: object
3939
spec:
40-
description: PluginConfigSpec defines the desired state of PluginConfig.
40+
description: |-
41+
PluginConfigSpec defines the desired state of a PluginConfig,
42+
in which plugins and their configurations are specified.
4143
properties:
4244
plugins:
4345
description: Plugins are an array of plugins and their configurations

0 commit comments

Comments
 (0)