Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add json tags to api-gateway types #3550

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 98 additions & 26 deletions charts/consul/templates/crd-apigateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,41 +196,113 @@ spec:
type: object
status:
properties:
conditions:
description: Conditions indicate the latest available observations
of a resource's current state.
addresses:
items:
description: 'Conditions define a readiness condition for a Consul
resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the condition
transitioned from one status to another.
format: date-time
type:
default: IPAddress
type: string
message:
description: A human readable message indicating details about
the transition.
value:
type: string
reason:
description: The reason for the condition's last transition.
required:
- type
- value
type: object
type: array
listeners:
items:
properties:
attachedRoutes:
format: int32
type: integer
name:
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition.
type: string
properties:
conditions:
description: Conditions indicate the latest available observations
of a resource's current state.
items:
description: 'Conditions define a readiness condition
for a Consul resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the
condition transitioned from one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details
about the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True,
False, Unknown.
type: string
type:
description: Type of condition.
type: string
required:
- status
- type
type: object
type: array
lastSyncedTime:
description: LastSyncedTime is the last time the resource
successfully synced with Consul.
format: date-time
type: string
type: object
required:
- status
- type
- attachedRoutes
- name
type: object
type: array
lastSyncedTime:
description: LastSyncedTime is the last time the resource successfully
synced with Consul.
format: date-time
type: string
status:
properties:
conditions:
description: Conditions indicate the latest available observations
of a resource's current state.
items:
description: 'Conditions define a readiness condition for a
Consul resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details
about the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False,
Unknown.
type: string
type:
description: Type of condition.
type: string
required:
- status
- type
type: object
type: array
lastSyncedTime:
description: LastSyncedTime is the last time the resource successfully
synced with Consul.
format: date-time
type: string
type: object
required:
- addresses
- listeners
type: object
type: object
served: true
Expand Down
72 changes: 38 additions & 34 deletions charts/consul/templates/crd-trafficpermissions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,25 @@ spec:
when evaluating rules for the incoming connection.
items:
properties:
header:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
headers:
items:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
type: array
methods:
description: Methods is the list of HTTP methods.
items:
Expand All @@ -138,23 +140,25 @@ spec:
type: array
type: object
type: array
header:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
headers:
items:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
type: array
methods:
description: Methods is the list of HTTP methods. If no
methods are specified, this rule will apply to all methods.
Expand Down
8 changes: 4 additions & 4 deletions control-plane/api/mesh/v2beta1/api_gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ type APIGateway struct {
}

type APIGatewayStatus struct {
Status
Addresses []GatewayAddress
Listeners []ListenerStatus
Status `json:"status,omitempty"`
Addresses []GatewayAddress `json:"addresses"`
Listeners []ListenerStatus `json:"listeners"`
}

type ListenerStatus struct {
Status
Status `json:"status,omitempty"`
Name string `json:"name"`
AttachedRoutes int32 `json:"attachedRoutes"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,25 @@ spec:
when evaluating rules for the incoming connection.
items:
properties:
header:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
headers:
items:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
type: array
methods:
description: Methods is the list of HTTP methods.
items:
Expand All @@ -134,23 +136,25 @@ spec:
type: array
type: object
type: array
header:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
headers:
items:
properties:
exact:
type: string
invert:
type: boolean
name:
type: string
prefix:
type: string
present:
type: boolean
regex:
type: string
suffix:
type: string
type: object
type: array
methods:
description: Methods is the list of HTTP methods. If no
methods are specified, this rule will apply to all methods.
Expand Down
Loading
Loading