Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Managed Service for Kubernetes
  • Comparing with other Yandex Cloud services
  • Getting started
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
    • Overview
      • Overview
      • Gwin policies
      • Installing Gwin
      • Migrating apps from an ALB ingress controller to Gwin
      • Migrating applications from NGINX Ingress to Gwin
      • Attachment mechanism for Gwin integration with Application Load Balancer
        • DirectResponse
        • Gateway
        • BackendTLSPolicy
        • GatewayPolicy
        • GRPCRoute
        • HTTPRoute
        • Ingress
        • IngressBackendGroup
        • IngressPolicy
        • ListenerSetPolicy
        • RoutePolicy
        • Service
        • ListenerSet
        • ServicePolicy
        • YCCertificate
        • TLSRoute
        • YCStorageBucket
    • Configuring security groups
    • Working with service accounts
    • Creating and updating resources via ingress controller configurations
  • Release notes

In this article:

  • Cheatsheet
  • ListenerSetPolicySpec
  • LocalObjectReference
  • LabelSelector
  • LabelSelectorRequirement
  • ListenerSetPolicyConfig
  • GatewayListener
  • HTTPRouterAttach
  • VirtualHostsAttach
  • Listener
  • ListenerHTTP
  • HTTPProtocolSettings
  • HTTP2Options
  • ListenerStream
  • ListenerSetPolicyStatus
  1. Application Load Balancer tools
  2. Gwin
  3. Resource configuration
  4. ListenerSetPolicy

ListenerSetPolicy

Written by
Yandex Cloud
Updated at July 3, 2026
View in Markdown
  • Cheatsheet
  • ListenerSetPolicySpec
    • LocalObjectReference
    • LabelSelector
    • LabelSelectorRequirement
    • ListenerSetPolicyConfig
    • GatewayListener
    • HTTPRouterAttach
    • VirtualHostsAttach
    • Listener
    • ListenerHTTP
    • HTTPProtocolSettings
    • HTTP2Options
    • ListenerStream
  • ListenerSetPolicyStatus

ListenerSetPolicy is a Gwin custom resource for configuring listener-level policies for ListenerSet resources. It allows you to define HTTP protocol settings, stream timeouts, and ALB resource naming that apply to ListenerSet resources matched by name or label selector.

ListenerSetPolicy and ListenerSet annotations are equivalent ways to configure the same settings. Use ListenerSetPolicy when you want to apply the same settings to multiple ListenerSets or manage policy separately from the ListenerSet resource.

  • Cheatsheet
  • ListenerSetPolicySpec
    • LocalObjectReference
    • LabelSelector
    • LabelSelectorRequirement
    • ListenerSetPolicyConfig
    • GatewayListener
    • Listener
    • ListenerHTTP
    • HTTPProtocolSettings
    • HTTP2Options
    • ListenerStream
  • ListenerSetPolicyStatus

CheatsheetCheatsheet

Note

Specification provided below is not valid configuration.

It's just demonstration of all ListenerSetPolicy fields.

apiVersion: gwin.yandex.cloud/v1
kind: ListenerSetPolicy
metadata:
  name: my-policy
  namespace: my-ns  # policy only matches ListenerSets in the same namespace
spec:
  targetRefs:
    - kind: ListenerSet
      name: my-listenerset  # target a specific ListenerSet by name
  selector:
    matchLabels:
      team: backend  # or target all ListenerSets with this label
  policy:
    listeners:  # applies to all listeners in matched ListenerSets
      albListenerName: "my-alb-listener"
      http:
        protocolSettings:
          allowHTTP10: "true"
          http2Options:
            maxConcurrentStreams: "100"
      stream:
        idleTimeout: "300s"
    listener:
      my-https-listener:  # applies only to the listener named "my-https-listener"
        albListenerName: "my-https-alb-listener"
        albHTTPRouterName: "my-https-router"
        http:
          protocolSettings:
            allowHTTP10: "false"
        attach:  # manage virtual hosts in an existing HTTP router
          virtualHosts:
            httpRouterID: "http-router-id"
Field Description
metadata Standard Kubernetes metadata.
spec ListenerSetPolicySpec
Policy specification.
status ListenerSetPolicyStatus
Status populated by the controller.

ListenerSetPolicySpecListenerSetPolicySpec

Appears in: ListenerSetPolicy

The policy is restricted to ListenerSet resources within the same namespace.

When determining which resources the policy applies to, the following rules are used:

  • If both targetRefs and selector are specified, a resource must match both criteria.
  • If neither is specified, the policy applies to all ListenerSets in the same namespace.
Field Description
targetRefs []LocalObjectReference
References to specific ListenerSets to target.
selector LabelSelector
Label selector for targeting ListenerSets.
policy ListenerSetPolicyConfig
The listener policy configuration.

LocalObjectReferenceLocalObjectReference

Reference to a resource in the same namespace.

Appears in: ListenerSetPolicySpec

Field Description
group string
API group of the resource.
Example: gateway.networking.k8s.io
kind string
Kind of the resource.
Example: ListenerSet
name string
Name of the resource.
Example: my-listenerset

LabelSelectorLabelSelector

Label-based selection criteria for ListenerSets.

Appears in: ListenerSetPolicySpec

Field Description
matchLabels map[string]string
Simple label matching requirements.
Example: team: backend
matchExpressions []LabelSelectorRequirement
Advanced label matching expressions.

LabelSelectorRequirementLabelSelectorRequirement

Appears in: LabelSelector

Field Description
key string
Label key to match.
Example: team
operator string
Matching operator.
Example: In, NotIn, Exists.
values []string
Values to match against.
Example: ["backend"]

ListenerSetPolicyConfigListenerSetPolicyConfig

Policy configuration for listeners in the matched ListenerSet.

Appears in: ListenerSetPolicySpec

Field Description
listeners GatewayListener
Settings applied to all listeners in the matched ListenerSet.
listener map[string]GatewayListener
Per-listener settings, keyed by listener name. Override the listeners defaults for specific listeners.

GatewayListenerGatewayListener

Settings for a listener.

Appears in: ListenerSetPolicyConfig

Field Description
albListenerName string
Custom name for the ALB listener.
Example: my-alb-listener
albHTTPRouterName string
Custom name for the ALB HTTP router.
Example: my-http-router
http ListenerHTTP
HTTP-specific listener settings.
stream ListenerStream
Stream-specific listener settings.
attach HTTPRouterAttach
Make the controller manage virtual hosts inside an existing ALB HTTP router instead of creating its own.

HTTPRouterAttachHTTPRouterAttach

Attachment to an existing cloud HTTP router.

Appears in: GatewayListener

Field Description
virtualHosts VirtualHostsAttach
Virtual hosts attachment configuration.

VirtualHostsAttachVirtualHostsAttach

Appears in: HTTPRouterAttach

Field Description
httpRouterID string
Cloud HTTP router ID whose virtual hosts are managed by this listener. The controller manages the full lifecycle (create, update, delete) of those virtual hosts.
Example: http-router-id

ListenerListener

Base listener settings (embedded in GatewayListener).

Appears in: GatewayListener

Field Description
albListenerName string
Custom name for the ALB listener.
Example: my-alb-listener
http ListenerHTTP
HTTP-specific settings.
stream ListenerStream
Stream-specific settings.

ListenerHTTPListenerHTTP

HTTP-specific listener settings.

Appears in: GatewayListener

Field Description
protocolSettings HTTPProtocolSettings
HTTP protocol options.

HTTPProtocolSettingsHTTPProtocolSettings

HTTP protocol options.

Appears in: ListenerHTTP

Field Description
allowHTTP10 boolean
Enables support for incoming HTTP/1.0 and HTTP/1.1 requests and disables it for HTTP/2 requests.
Example: true
http2Options HTTP2Options
HTTP/2 connection settings.

HTTP2OptionsHTTP2Options

HTTP/2 connection settings.

Appears in: HTTPProtocolSettings

Field Description
maxConcurrentStreams number
Maximum number of concurrent HTTP/2 streams in a connection.
Example: 100

ListenerStreamListenerStream

Stream listener settings.

Appears in: GatewayListener

Field Description
idleTimeout duration
Duration during which no data is transmitted or received on either the upstream or downstream connection before the connection is closed.
Example: 300s

ListenerSetPolicyStatusListenerSetPolicyStatus

Appears in: ListenerSetPolicy

Field Description
conditions []Condition
Policy conditions. Known type: Accepted.
attachedListenerSets int32
Number of ListenerSets this policy is currently attached to.

Was the article helpful?

Previous
IngressPolicy
Next
RoutePolicy
© 2026 Direct Cursus Technology L.L.C.