Skip to content

Service AppProtocol should allow IANA standard service names like "http", "https" #6560

@kghost

Description

@kghost

What steps did you take and what happened:

Create a service with appProtocol:

apiVersion: v1
kind: Service
metadata:
  name: hello-service
spec:
  ports:
  - appProtocol: https
    name: https
    port: 443
    protocol: TCP
    targetPort: https

Create a httproute with pointing to to service:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: hello-route
spec:
  parentRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      namespace: projectcontour
      name: contour
      sectionName: https
  hostnames:
    - example.com
  rules:
    - backendRefs:
      - kind: Service
        name: hello-service
        port: 80

What did you expect to happen:

The route is installed successfully, but got an error:

    - lastTransitionTime: "2024-07-17T09:36:00Z"
      message: 'AppProtocol: "http" is unsupported'
      observedGeneration: 3
      reason: UnsupportedProtocol
      status: "False"
      type: ResolvedRefs

According to the spec https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol

appProtocol can be IANA service names listed here: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml

These should be all valid:

  • http
  • www
  • www-http
  • https

Anything else you would like to add:

Environment:

  • Contour version: v1.29.1
  • Kubernetes version: (use kubectl version): v1.30.1
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions