{
  "description": "ListenerSet defines a set of additional listeners to attach to an existing Gateway.\nThis resource provides a mechanism to merge multiple listeners into a single Gateway.\n\nThe parent Gateway must explicitly allow ListenerSet attachment through its\nAllowedListeners configuration. By default, Gateways do not allow ListenerSet\nattachment.\n\nRoutes can attach to a ListenerSet by specifying it as a parentRef, and can\noptionally target specific listeners using the sectionName field.\n\nPolicy Attachment:\n- Policies that attach to a ListenerSet apply to all listeners defined in that resource\n- Policies do not impact listeners in the parent Gateway\n- Different ListenerSets attached to the same Gateway can have different policies\n- If an implementation cannot apply a policy to specific listeners, it should reject the policy\n\nReferenceGrant Semantics:\n- ReferenceGrants applied to a Gateway are not inherited by child ListenerSets\n- ReferenceGrants applied to a ListenerSet do not grant permission to the parent Gateway's listeners\n- A ListenerSet can reference secrets/backends in its own namespace without a ReferenceGrant\n\nGateway Integration:\n  - The parent Gateway's status will include \"AttachedListenerSets\"\n    which is the count of ListenerSets that have successfully attached to a Gateway\n    A ListenerSet is successfully attached to a Gateway when all the following conditions are met:\n  - The ListenerSet is selected by the Gateway's AllowedListeners field\n  - The ListenerSet has a valid ParentRef selecting the Gateway\n  - The ListenerSet's status has the condition \"Accepted: true\"",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": [
        "string",
        "null"
      ]
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "Spec defines the desired state of ListenerSet.",
      "properties": {
        "listeners": {
          "description": "Listeners associated with this ListenerSet. Listeners define\nlogical endpoints that are bound on this referenced parent Gateway's addresses.\n\nListeners in a `Gateway` and their attached `ListenerSets` are concatenated\nas a list when programming the underlying infrastructure. Each listener\nname does not need to be unique across the Gateway and ListenerSets.\nSee ListenerEntry.Name for more details.\n\nImplementations MUST treat the parent Gateway as having the merged\nlist of all listeners from itself and attached ListenerSets using\nthe following precedence:\n\n1. \"parent\" Gateway\n2. ListenerSet ordered by creation time (oldest first)\n3. ListenerSet ordered alphabetically by \"{namespace}/{name}\".\n\nAn implementation MAY reject listeners by setting the ListenerEntryStatus\n`Accepted` condition to False with the Reason `TooManyListeners`\n\nIf a listener has a conflict, this will be reported in the\nStatus.ListenerEntryStatus setting the `Conflicted` condition to True.\n\nImplementations SHOULD be cautious about what information from the\nparent or siblings are reported to avoid accidentally leaking\nsensitive information that the child would not otherwise have access\nto. This can include contents of secrets etc.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "allowedRoutes": {
                "additionalProperties": false,
                "default": {
                  "namespaces": {
                    "from": "Same"
                  }
                },
                "description": "AllowedRoutes defines the types of routes that MAY be attached to a\nListener and the trusted namespaces where those Route resources MAY be\npresent.\n\nAlthough a client request may match multiple route rules, only one rule\nmay ultimately receive the request. Matching precedence MUST be\ndetermined in order of the following criteria:\n\n* The most specific match as defined by the Route type.\n* The oldest Route based on creation timestamp. For example, a Route with\n  a creation timestamp of \"2020-09-08 01:02:03\" is given precedence over\n  a Route with a creation timestamp of \"2020-09-08 01:02:04\".\n* If everything else is equivalent, the Route appearing first in\n  alphabetical order (namespace/name) should be given precedence. For\n  example, foo/bar is given precedence over foo/baz.\n\nAll valid rules within a Route attached to this Listener should be\nimplemented. Invalid Route rules can be ignored (sometimes that will mean\nthe full Route). If a Route rule transitions from valid to invalid,\nsupport for that Route rule should be dropped to ensure consistency. For\nexample, even if a filter specified by a Route rule is invalid, the rest\nof the rules within that Route should still be supported.",
                "properties": {
                  "kinds": {
                    "description": "Kinds specifies the groups and kinds of Routes that are allowed to bind\nto this Gateway Listener. When unspecified or empty, the kinds of Routes\nselected are determined using the Listener protocol.\n\nA RouteGroupKind MUST correspond to kinds of Routes that are compatible\nwith the application protocol specified in the Listener's Protocol field.\nIf an implementation does not support or recognize this resource type, it\nMUST set the \"ResolvedRefs\" condition to False for this Listener with the\n\"InvalidRouteKinds\" reason.\n\nSupport: Core",
                    "items": {
                      "additionalProperties": false,
                      "description": "RouteGroupKind indicates the group and kind of a Route resource.",
                      "properties": {
                        "group": {
                          "default": "gateway.networking.k8s.io",
                          "description": "Group is the group of the Route.",
                          "maxLength": 253,
                          "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "description": "Kind is the kind of the Route.",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind"
                      ],
                      "type": "object"
                    },
                    "maxItems": 8,
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  },
                  "namespaces": {
                    "additionalProperties": false,
                    "default": {
                      "from": "Same"
                    },
                    "description": "Namespaces indicates namespaces from which Routes may be attached to this\nListener. This is restricted to the namespace of this Gateway by default.\n\nSupport: Core",
                    "properties": {
                      "from": {
                        "default": "Same",
                        "description": "From indicates where Routes will be selected for this Gateway. Possible\nvalues are:\n\n* All: Routes in all namespaces may be used by this Gateway.\n* Selector: Routes in namespaces selected by the selector may be used by\n  this Gateway.\n* Same: Only Routes in the same namespace may be used by this Gateway.\n\nSupport: Core",
                        "enum": [
                          "All",
                          "Selector",
                          "Same"
                        ],
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "selector": {
                        "additionalProperties": false,
                        "description": "Selector must be specified when From is set to \"Selector\". In that case,\nonly Routes in Namespaces matching this Selector will be selected by this\nGateway. This field is ignored for other values of \"From\".\n\nSupport: Core",
                        "properties": {
                          "matchExpressions": {
                            "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                            "items": {
                              "additionalProperties": false,
                              "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values.",
                              "properties": {
                                "key": {
                                  "description": "key is the label key that the selector applies to.",
                                  "type": "string"
                                },
                                "operator": {
                                  "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist.",
                                  "type": "string"
                                },
                                "values": {
                                  "description": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "x-kubernetes-list-type": "atomic"
                                }
                              },
                              "required": [
                                "key",
                                "operator"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ],
                            "x-kubernetes-list-type": "atomic"
                          },
                          "matchLabels": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                            "type": [
                              "object",
                              "null"
                            ]
                          }
                        },
                        "type": [
                          "object",
                          "null"
                        ],
                        "x-kubernetes-map-type": "atomic"
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "filters": {
                "additionalProperties": false,
                "description": "Filters groups the pre-routing filter lists that run on every\nrequest accepted on this Listener, before route matching is\nperformed. Filters is only valid when Protocol is `HTTP` or\n`HTTPS`; this constraint is enforced by CEL validation on the\nenclosing Listener struct.\n\nSupport: Extended",
                "properties": {
                  "requests": {
                    "description": "Implementations MUST execute the filters in the exact order they\nappear here and MUST NOT reorder them. If an implementation can\nnot implement the filters in the order they are specified, the\nimplementation MUST set the \"Accepted\" Listener condition to \"false\"\nwith the \"InvalidListenerFilterOrder\" reason.\n\nRequests only apply to connections with a visible HTTP stream\nand metadata (Protocol=HTTP, or Protocol=HTTPS with TLS\nterminated at the Gateway).\n\nRequests may mutate inputs that route matching consumes\n(path, request headers, method, computed metadata), with the\nexplicit exception of the `Host` and `:authority` headers. If a\nListenerFilter attempts to modify either header, implementations\nMUST NOT allow that modification to take effect. Implementations\nSHOULD satisfy this by ignoring the mutation and continuing to\nprocess the request with the original value; they MAY instead\nfail the request with a 5xx response. Implementations MUST\nevaluate route matching exactly once after the last\nListenerFilter has run.\n\nRequests MUST NOT be interpreted as changing which Listener\nhandles the request. Listener selection is decided from inputs\nthe client committed to before any pre-routing filter runs: TLS\nSNI (for HTTPS) or the request's initial Host header (for HTTP).\nBecause filters cannot modify Host or :authority, the input to\ncleartext-HTTP Listener selection cannot change; Listener\nselection therefore does not need to be re-evaluated after\npre-routing filters run, and MUST NOT be.",
                    "items": {
                      "additionalProperties": false,
                      "description": "ListenerFilter is one element of a ListenerFilters.Requests list.\nUnlike HTTPRouteFilter, which runs after a route is selected and whose\nordering is a SHOULD, ListenerFilter runs before route selection and\nits ordering within the containing list is a MUST.\n\nOnly a subset of HTTPRouteFilter variants are permitted:\nExternalAuth (to establish identity that route matching can consume) and\nExtensionRef (the escape hatch for custom pre-routing behavior, for\nexample body-based routing or JWT-claim projection). The other\nHTTPRouteFilter variants are excluded because they either cannot influence\nroute selection or can already be expressed post-routing with equal\nexpressiveness. See the GEP text for details.",
                      "properties": {
                        "extensionRef": {
                          "additionalProperties": false,
                          "description": "LocalObjectReference identifies an API object within the namespace of the\nreferrer.\nThe API object must be valid in the cluster; the Group and Kind must\nbe registered in the cluster for this reference to be valid.\n\nReferences to objects with invalid Group and Kind are not valid, and must\nbe rejected by the implementation, with appropriate Conditions set\non the containing object.",
                          "properties": {
                            "group": {
                              "description": "Group is the group of the referent. For example, \"gateway.networking.k8s.io\".\nWhen unspecified or empty string, core API group is inferred.",
                              "maxLength": 253,
                              "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                              "type": "string"
                            },
                            "kind": {
                              "description": "Kind is kind of the referent. For example \"HTTPRoute\" or \"Service\".",
                              "maxLength": 63,
                              "minLength": 1,
                              "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                              "type": "string"
                            },
                            "name": {
                              "description": "Name is the name of the referent.",
                              "maxLength": 253,
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "group",
                            "kind",
                            "name"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "externalAuth": {
                          "additionalProperties": false,
                          "description": "HTTPExternalAuthFilter defines a filter that modifies requests by sending\nrequest details to an external authorization server.\n\nSupport: Extended\nFeature Name: HTTPRouteExternalAuth",
                          "properties": {
                            "backendRef": {
                              "additionalProperties": false,
                              "description": "BackendRef is a reference to a backend to send authorization\nrequests to.\n\nThe backend must speak the selected protocol (GRPC or HTTP) on the\nreferenced port.\n\nIf the backend service requires TLS, use BackendTLSPolicy to tell the\nimplementation to supply the TLS details to be used to connect to that\nbackend.",
                              "properties": {
                                "group": {
                                  "default": "",
                                  "description": "Group is the group of the referent. For example, \"gateway.networking.k8s.io\".\nWhen unspecified or empty string, core API group is inferred.",
                                  "maxLength": 253,
                                  "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "kind": {
                                  "default": "Service",
                                  "description": "Kind is the Kubernetes resource kind of the referent. For example\n\"Service\".\n\nDefaults to \"Service\" when not specified.\n\nExternalName services can refer to CNAME DNS records that may live\noutside of the cluster and as such are difficult to reason about in\nterms of conformance. They also may not be safe to forward to (see\nCVE-2021-25740 for more information). Implementations SHOULD NOT\nsupport ExternalName Services.\n\nSupport: Core (Services with a type other than ExternalName)\n\nSupport: Implementation-specific (Services with type ExternalName)",
                                  "maxLength": 63,
                                  "minLength": 1,
                                  "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "Name is the name of the referent.",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "namespace": {
                                  "description": "Namespace is the namespace of the backend. When unspecified, the local\nnamespace is inferred.\n\nNote that when a namespace different than the local namespace is specified,\na ReferenceGrant object is required in the referent namespace to allow that\nnamespace's owner to accept the reference. See the ReferenceGrant\ndocumentation for details.\n\nSupport: Core",
                                  "maxLength": 63,
                                  "minLength": 1,
                                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "port": {
                                  "description": "Port specifies the destination port number to use for this resource.\nPort is required when the referent is a Kubernetes Service. In this\ncase, the port number is the service port number, not the target port.\nFor other resources, destination port might be derived from the referent\nresource or this field.",
                                  "format": "int32",
                                  "maximum": 65535,
                                  "minimum": 1,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "type": "object",
                              "x-kubernetes-validations": [
                                {
                                  "message": "Must have port for Service reference",
                                  "rule": "(size(self.group) == 0 \u0026\u0026 self.kind == 'Service') ? has(self.port) : true"
                                },
                                {
                                  "message": "Must not have port for Backend reference",
                                  "rule": "(self.group == 'gateway.networking.x-k8s.io' \u0026\u0026 self.kind == 'XBackend') ? !has(self.port) : true"
                                }
                              ]
                            },
                            "forwardBody": {
                              "additionalProperties": false,
                              "description": "ForwardBody controls if requests to the authorization server should include\nthe body of the client request; and if so, how big that body is allowed\nto be.\n\nIt is expected that implementations will buffer the request body up to\n`forwardBody.maxSize` bytes. Bodies over that size must be rejected with a\n4xx series error (413 or 403 are common examples), and fail processing\nof the filter.\n\nIf unset, or `forwardBody.maxSize` is set to `0`, then the body will not\nbe forwarded.\n\nFeature Name: HTTPRouteExternalAuthForwardBody",
                              "properties": {
                                "maxSize": {
                                  "description": "MaxSize specifies how large in bytes the largest body that will be buffered\nand sent to the authorization server. If the body size is larger than\n`maxSize`, then the body sent to the authorization server must be\ntruncated to `maxSize` bytes.\n\nExperimental note: This behavior needs to be checked against\nvarious dataplanes; it may need to be changed.\nSee https://github.com/kubernetes-sigs/gateway-api/pull/4001#discussion_r2291405746\nfor more.\n\nIf 0, the body will not be sent to the authorization server.",
                                  "format": "int32",
                                  "minimum": 0,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "grpc": {
                              "additionalProperties": false,
                              "description": "GRPCAuthConfig contains configuration for communication with ext_authz\nprotocol-speaking backends.\n\nIf unset, implementations must assume the default behavior for each\nincluded field is intended.",
                              "properties": {
                                "allowedHeaders": {
                                  "description": "AllowedRequestHeaders specifies what headers from the client request\nwill be sent to the authorization server.\n\nIf this list is empty, then all headers must be sent.\n\nIf the list has entries, only those entries must be sent.",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 64,
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "x-kubernetes-list-type": "set"
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "http": {
                              "additionalProperties": false,
                              "description": "HTTPAuthConfig contains configuration for communication with HTTP-speaking\nbackends.\n\nIf unset, implementations must assume the default behavior for each\nincluded field is intended.",
                              "properties": {
                                "allowedHeaders": {
                                  "description": "AllowedRequestHeaders specifies what additional headers from the client request\nwill be sent to the authorization server.\n\nThe following headers must always be sent to the authorization server,\nregardless of this setting:\n\n* `Host`\n* `Method`\n* `Path`\n* `Content-Length`\n* `Authorization`\n\nIf this list is empty, then only those headers must be sent.\n\nNote that `Content-Length` has a special behavior, in that the length\nsent must be correct for the actual request to the external authorization\nserver - that is, it must reflect the actual number of bytes sent in the\nbody of the request to the authorization server.\n\nSo if the `forwardBody` stanza is unset, or `forwardBody.maxSize` is set\nto `0`, then `Content-Length` must be `0`. If `forwardBody.maxSize` is set\nto anything other than `0`, then the `Content-Length` of the authorization\nrequest must be set to the actual number of bytes forwarded.",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 64,
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "x-kubernetes-list-type": "set"
                                },
                                "allowedResponseHeaders": {
                                  "description": "AllowedResponseHeaders specifies what headers from the authorization response\nwill be copied into the request to the backend.\n\nIf this list is empty, then all headers from the authorization server\nexcept Authority or Host must be copied.",
                                  "items": {
                                    "type": "string"
                                  },
                                  "maxItems": 64,
                                  "type": [
                                    "array",
                                    "null"
                                  ],
                                  "x-kubernetes-list-type": "set"
                                },
                                "path": {
                                  "description": "Path sets the prefix that paths from the client request will have added\nwhen forwarded to the authorization server.\n\nWhen empty or unspecified, no prefix is added.\n\nValid values are the same as the \"value\" regex for path values in the `match`\nstanza, and the validation regex will screen out invalid paths in the same way.\nEven with the validation, implementations MUST sanitize this input before using it\ndirectly.",
                                  "maxLength": 1024,
                                  "pattern": "^(?:[-A-Za-z0-9/._~!$\u0026'()*+,;=:@]|[%][0-9a-fA-F]{2})+$",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "protocol": {
                              "description": "ExternalAuthProtocol describes which protocol to use when communicating with an\next_authz authorization server.\n\nWhen this is set to GRPC, each backend must use the Envoy ext_authz protocol\non the port specified in `backendRefs`. Requests and responses are defined\nin the protobufs explained at:\nhttps://www.envoyproxy.io/docs/envoy/latest/api-v3/service/auth/v3/external_auth.proto\n\nWhen this is set to HTTP, each backend must respond with a `200` status\ncode in on a successful authorization. Any other code is considered\nan authorization failure.\n\nFeature Names:\nGRPC Support - HTTPRouteExternalAuthGRPC\nHTTP Support - HTTPRouteExternalAuthHTTP",
                              "enum": [
                                "HTTP",
                                "GRPC"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "backendRef",
                            "protocol"
                          ],
                          "type": [
                            "object",
                            "null"
                          ],
                          "x-kubernetes-validations": [
                            {
                              "message": "grpc must be specified when protocol is set to 'GRPC'",
                              "rule": "self.protocol == 'GRPC' ? has(self.grpc) : true"
                            },
                            {
                              "message": "protocol must be 'GRPC' when grpc is set",
                              "rule": "has(self.grpc) ? self.protocol == 'GRPC' : true"
                            },
                            {
                              "message": "http must be specified when protocol is set to 'HTTP'",
                              "rule": "self.protocol == 'HTTP' ? has(self.http) : true"
                            },
                            {
                              "message": "protocol must be 'HTTP' when http is set",
                              "rule": "has(self.http) ? self.protocol == 'HTTP' : true"
                            }
                          ]
                        },
                        "type": {
                          "description": "Type identifies which variant of the discriminated union below is\npopulated. Uses the same union-discriminator pattern as\nHTTPRouteFilter and GRPCRouteFilter.",
                          "enum": [
                            "ExternalAuth",
                            "ExtensionRef"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type"
                      ],
                      "type": "object",
                      "x-kubernetes-validations": [
                        {
                          "message": "filter.externalAuth must be nil if the filter.type is not ExternalAuth",
                          "rule": "!(has(self.externalAuth) \u0026\u0026 self.type != 'ExternalAuth')"
                        },
                        {
                          "message": "filter.externalAuth must be specified for ExternalAuth filter.type",
                          "rule": "!(!has(self.externalAuth) \u0026\u0026 self.type == 'ExternalAuth')"
                        },
                        {
                          "message": "filter.extensionRef must be nil if the filter.type is not ExtensionRef",
                          "rule": "!(has(self.extensionRef) \u0026\u0026 self.type != 'ExtensionRef')"
                        },
                        {
                          "message": "filter.extensionRef must be specified for ExtensionRef filter.type",
                          "rule": "!(!has(self.extensionRef) \u0026\u0026 self.type == 'ExtensionRef')"
                        }
                      ]
                    },
                    "maxItems": 16,
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },
              "hostname": {
                "description": "Hostname specifies the virtual hostname to match for protocol types that\ndefine this concept. When unspecified, all hostnames are matched. This\nfield is ignored for protocols that don't require hostname based\nmatching.\n\nImplementations MUST apply Hostname matching appropriately for each of\nthe following protocols:\n\n* TLS: The Listener Hostname MUST match the SNI.\n* HTTP: The Listener Hostname MUST match the Host header of the request.\n* HTTPS: The Listener Hostname SHOULD match at both the TLS and HTTP\n  protocol layers as described above. If an implementation does not\n  ensure that both the SNI and Host header match the Listener hostname,\n  it MUST clearly document that.\n\nFor HTTPRoute and TLSRoute resources, there is an interaction with the\n`spec.hostnames` array. When both listener and route specify hostnames,\nthere MUST be an intersection between the values for a Route to be\naccepted. For more information, refer to the Route specific Hostnames\ndocumentation.\n\nHostnames that are prefixed with a wildcard label (`*.`) are interpreted\nas a suffix match. That means that a match for `*.example.com` would match\nboth `test.example.com`, and `foo.test.example.com`, but not `example.com`.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^(\\*\\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "Name is the name of the Listener. This name MUST be unique within a\nListenerSet.\n\nName is not required to be unique across a Gateway and ListenerSets.\nRoutes can attach to a Listener by having a ListenerSet as a parentRef\nand setting the SectionName",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              },
              "port": {
                "description": "Port is the network port. Multiple listeners may use the\nsame port, subject to the Listener compatibility rules.",
                "format": "int32",
                "maximum": 65535,
                "minimum": 1,
                "type": "integer"
              },
              "protocol": {
                "description": "Protocol specifies the network protocol this listener expects to receive.",
                "maxLength": 255,
                "minLength": 1,
                "pattern": "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/[A-Za-z0-9]+$",
                "type": "string"
              },
              "tls": {
                "additionalProperties": false,
                "description": "TLS is the TLS configuration for the Listener. This field is required if\nthe Protocol field is \"HTTPS\" or \"TLS\". It is invalid to set this field\nif the Protocol field is \"HTTP\", \"TCP\", or \"UDP\".\n\nThe association of SNIs to Certificate defined in ListenerTLSConfig is\ndefined based on the Hostname field for this listener.\n\nThe GatewayClass MUST use the longest matching SNI out of all\navailable certificates for any TLS handshake.",
                "properties": {
                  "certificateRefs": {
                    "description": "CertificateRefs contains a series of references to Kubernetes objects that\ncontains TLS certificates and private keys. These certificates are used to\nestablish a TLS handshake for requests that match the hostname of the\nassociated listener.\n\nA single CertificateRef to a Kubernetes Secret has \"Core\" support.\nImplementations MAY choose to support attaching multiple certificates to\na Listener, but this behavior is implementation-specific.\n\nReferences to a resource in different namespace are invalid UNLESS there\nis a ReferenceGrant in the target namespace that allows the certificate\nto be attached. If a ReferenceGrant does not allow this reference, the\n\"ResolvedRefs\" condition MUST be set to False for this listener with the\n\"RefNotPermitted\" reason.\n\nThis field is required to have at least one element when the mode is set\nto \"Terminate\" (default) and is optional otherwise.\n\nCertificateRefs can reference to standard Kubernetes resources, i.e.\nSecret, or implementation-specific custom resources.\n\nSupport: Core - A single reference to a Kubernetes Secret of type kubernetes.io/tls\n\nSupport: Implementation-specific (More than one reference or other resource types)",
                    "items": {
                      "additionalProperties": false,
                      "description": "SecretObjectReference identifies an API object including its namespace,\ndefaulting to Secret.\n\nThe API object must be valid in the cluster; the Group and Kind must\nbe registered in the cluster for this reference to be valid.\n\nReferences to objects with invalid Group and Kind are not valid, and must\nbe rejected by the implementation, with appropriate Conditions set\non the containing object.",
                      "properties": {
                        "group": {
                          "default": "",
                          "description": "Group is the group of the referent. For example, \"gateway.networking.k8s.io\".\nWhen unspecified or empty string, core API group is inferred.",
                          "maxLength": 253,
                          "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "kind": {
                          "default": "Secret",
                          "description": "Kind is kind of the referent. For example \"Secret\".",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "description": "Name is the name of the referent.",
                          "maxLength": 253,
                          "minLength": 1,
                          "type": "string"
                        },
                        "namespace": {
                          "description": "Namespace is the namespace of the referenced object. When unspecified, the local\nnamespace is inferred.\n\nNote that when a namespace different than the local namespace is specified,\na ReferenceGrant object is required in the referent namespace to allow that\nnamespace's owner to accept the reference. See the ReferenceGrant\ndocumentation for details.\n\nSupport: Core",
                          "maxLength": 63,
                          "minLength": 1,
                          "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "type": "object"
                    },
                    "maxItems": 64,
                    "type": [
                      "array",
                      "null"
                    ],
                    "x-kubernetes-list-type": "atomic"
                  },
                  "mode": {
                    "default": "Terminate",
                    "description": "Mode defines the TLS behavior for the TLS session initiated by the client.\nThere are two possible modes:\n\n- Terminate: The TLS session between the downstream client and the\n  Gateway is terminated at the Gateway. This mode requires certificates\n  to be specified in some way, such as populating the certificateRefs\n  field.\n- Passthrough: The TLS session is NOT terminated by the Gateway. This\n  implies that the Gateway can't decipher the TLS stream except for\n  the ClientHello message of the TLS protocol. The certificateRefs field\n  is ignored in this mode.\n\nSupport: Core",
                    "enum": [
                      "Terminate",
                      "Passthrough"
                    ],
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "options": {
                    "additionalProperties": {
                      "description": "AnnotationValue is the value of an annotation in Gateway API. This is used\nfor validation of maps such as TLS options. This roughly matches Kubernetes\nannotation validation, although the length validation in that case is based\non the entire size of the annotations struct.",
                      "maxLength": 4096,
                      "minLength": 0,
                      "type": "string"
                    },
                    "description": "Options are a list of key/value pairs to enable extended TLS\nconfiguration for each implementation. For example, configuring the\nminimum TLS version or supported cipher suites.\n\nA set of common keys MAY be defined by the API in the future. To avoid\nany ambiguity, implementation-specific definitions MUST use\ndomain-prefixed names, such as `example.com/my-custom-option`.\nUn-prefixed names are reserved for key names defined by Gateway API.\n\nSupport: Implementation-specific",
                    "maxProperties": 16,
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ],
                "x-kubernetes-validations": [
                  {
                    "message": "certificateRefs or options must be specified when mode is Terminate",
                    "rule": "self.mode == 'Terminate' ? size(self.certificateRefs) \u003e 0 || size(self.options) \u003e 0 : true"
                  }
                ]
              }
            },
            "required": [
              "name",
              "port",
              "protocol"
            ],
            "type": "object"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array",
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map",
          "x-kubernetes-validations": [
            {
              "message": "tls must not be specified for protocols ['HTTP', 'TCP', 'UDP']",
              "rule": "self.all(l, l.protocol in ['HTTP', 'TCP', 'UDP'] ? !has(l.tls) : true)"
            },
            {
              "message": "tls mode must be Terminate for protocol HTTPS",
              "rule": "self.all(l, (l.protocol == 'HTTPS' \u0026\u0026 has(l.tls)) ? (l.tls.mode == '' || l.tls.mode == 'Terminate') : true)"
            },
            {
              "message": "tls mode must be set for protocol TLS",
              "rule": "self.all(l, (l.protocol == 'TLS' ? has(l.tls) \u0026\u0026 has(l.tls.mode) \u0026\u0026 l.tls.mode != '' : true))"
            },
            {
              "message": "hostname must not be specified for protocols ['TCP', 'UDP']",
              "rule": "self.all(l, l.protocol in ['TCP', 'UDP']  ? (!has(l.hostname) || l.hostname == '') : true)"
            },
            {
              "message": "Listener name must be unique within the Gateway",
              "rule": "self.all(l1, self.exists_one(l2, l1.name == l2.name))"
            },
            {
              "message": "Combination of port, protocol and hostname must be unique for each listener",
              "rule": "self.all(l1, !has(l1.port) || self.exists_one(l2, has(l2.port) \u0026\u0026 l1.port == l2.port \u0026\u0026 l1.protocol == l2.protocol \u0026\u0026 (has(l1.hostname) \u0026\u0026 has(l2.hostname) ? l1.hostname == l2.hostname : !has(l1.hostname) \u0026\u0026 !has(l2.hostname))))"
            }
          ]
        },
        "parentRef": {
          "additionalProperties": false,
          "description": "ParentRef references the Gateway that the listeners are attached to.",
          "properties": {
            "group": {
              "default": "gateway.networking.k8s.io",
              "description": "Group is the group of the referent.",
              "maxLength": 253,
              "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
              "type": [
                "string",
                "null"
              ]
            },
            "kind": {
              "default": "Gateway",
              "description": "Kind is kind of the referent. For example \"Gateway\".",
              "maxLength": 63,
              "minLength": 1,
              "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
              "type": [
                "string",
                "null"
              ]
            },
            "name": {
              "description": "Name is the name of the referent.",
              "maxLength": 253,
              "minLength": 1,
              "type": "string"
            },
            "namespace": {
              "description": "Namespace is the namespace of the referent.  If not present,\nthe namespace of the referent is assumed to be the same as\nthe namespace of the referring object.",
              "maxLength": 63,
              "minLength": 1,
              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "required": [
        "listeners",
        "parentRef"
      ],
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "default": {
        "conditions": [
          {
            "lastTransitionTime": "1970-01-01T00:00:00Z",
            "message": "Waiting for controller",
            "reason": "Pending",
            "status": "Unknown",
            "type": "Accepted"
          },
          {
            "lastTransitionTime": "1970-01-01T00:00:00Z",
            "message": "Waiting for controller",
            "reason": "Pending",
            "status": "Unknown",
            "type": "Programmed"
          }
        ]
      },
      "description": "Status defines the current state of ListenerSet.",
      "properties": {
        "conditions": {
          "default": [
            {
              "lastTransitionTime": "1970-01-01T00:00:00Z",
              "message": "Waiting for controller",
              "reason": "Pending",
              "status": "Unknown",
              "type": "Accepted"
            },
            {
              "lastTransitionTime": "1970-01-01T00:00:00Z",
              "message": "Waiting for controller",
              "reason": "Pending",
              "status": "Unknown",
              "type": "Programmed"
            }
          ],
          "description": "Conditions describe the current conditions of the ListenerSet.\n\nImplementations MUST express ListenerSet conditions using the\n`ListenerSetConditionType` and `ListenerSetConditionReason`\nconstants so that operators and tools can converge on a common\nvocabulary to describe ListenerSet state.\n\nKnown condition types are:\n\n* \"Accepted\"\n* \"Programmed\"",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "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])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "maxItems": 8,
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "listeners": {
          "description": "Listeners provide status for each unique listener port defined in the Spec.",
          "items": {
            "additionalProperties": false,
            "description": "ListenerStatus is the status associated with a Listener.",
            "properties": {
              "attachedRoutes": {
                "description": "AttachedRoutes represents the total number of Routes that have been\nsuccessfully attached to this Listener.\n\nSuccessful attachment of a Route to a Listener is based solely on the\ncombination of the AllowedRoutes field on the corresponding Listener\nand the Route's ParentRefs field. A Route is successfully attached to\na Listener when it is selected by the Listener's AllowedRoutes field\nAND the Route has a valid ParentRef selecting the whole Gateway\nresource or a specific Listener as a parent resource (more detail on\nattachment semantics can be found in the documentation on the various\nRoute kinds ParentRefs fields). Listener status does not impact\nsuccessful attachment, i.e. the AttachedRoutes field count MUST be set\nfor Listeners, even if the Accepted condition of an individual Listener is set\nto \"False\". The AttachedRoutes number represents the number of Routes with\nthe Accepted condition set to \"True\" that have been attached to this Listener.\nRoutes with any other value for the Accepted condition MUST NOT be included\nin this count.\n\nUses for this field include troubleshooting Route attachment and\nmeasuring blast radius/impact of changes to a Listener.",
                "format": "int32",
                "type": "integer"
              },
              "conditions": {
                "description": "Conditions describe the current condition of this listener.",
                "items": {
                  "additionalProperties": false,
                  "description": "Condition contains details for one aspect of the current state of this API Resource.",
                  "properties": {
                    "lastTransitionTime": {
                      "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                      "format": "date-time",
                      "type": "string"
                    },
                    "message": {
                      "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                      "maxLength": 32768,
                      "type": "string"
                    },
                    "observedGeneration": {
                      "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                      "format": "int64",
                      "minimum": 0,
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "reason": {
                      "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                      "maxLength": 1024,
                      "minLength": 1,
                      "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                      "type": "string"
                    },
                    "status": {
                      "description": "status of the condition, one of True, False, Unknown.",
                      "enum": [
                        "True",
                        "False",
                        "Unknown"
                      ],
                      "type": "string"
                    },
                    "type": {
                      "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                      "maxLength": 316,
                      "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])$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "lastTransitionTime",
                    "message",
                    "reason",
                    "status",
                    "type"
                  ],
                  "type": "object"
                },
                "maxItems": 8,
                "type": "array",
                "x-kubernetes-list-map-keys": [
                  "type"
                ],
                "x-kubernetes-list-type": "map"
              },
              "name": {
                "description": "Name is the name of the Listener that this status corresponds to.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                "type": "string"
              },
              "supportedKinds": {
                "description": "SupportedKinds is the list indicating the Kinds supported by this\nlistener. This MUST represent the kinds supported by an implementation for\nthat Listener configuration.\n\nIf kinds are specified in Spec that are not supported, they MUST NOT\nappear in this list and an implementation MUST set the \"ResolvedRefs\"\ncondition to \"False\" with the \"InvalidRouteKinds\" reason. If both valid\nand invalid Route kinds are specified, the implementation MUST\nreference the valid Route kinds that have been specified.",
                "items": {
                  "additionalProperties": false,
                  "description": "RouteGroupKind indicates the group and kind of a Route resource.",
                  "properties": {
                    "group": {
                      "default": "gateway.networking.k8s.io",
                      "description": "Group is the group of the Route.",
                      "maxLength": 253,
                      "pattern": "^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "description": "Kind is the kind of the Route.",
                      "maxLength": 63,
                      "minLength": 1,
                      "pattern": "^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "kind"
                  ],
                  "type": "object"
                },
                "maxItems": 8,
                "type": [
                  "array",
                  "null"
                ],
                "x-kubernetes-list-type": "atomic"
              }
            },
            "required": [
              "attachedRoutes",
              "conditions",
              "name"
            ],
            "type": "object"
          },
          "maxItems": 64,
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-map-keys": [
            "name"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}