kind: GatewayClass
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: acme-lb
controller: acme.io/gateway-controller
parameters:
  apiGroup: networking.acme.io
  kind: AcmeLBConfig
  name: acme-lb-config
---
kind: Gateway
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: my-gateway
  namespace: default
spec:
  class: acme-lb
  listeners:  # Use GatewayClass defaults for listener definition.
  - name: my-http-listener
    protocol: HTTP
  routes:
    namespaceSelector:
      matchLabels:
        "": ""
---
kind: HTTPRoute
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: http-app-1
  namespace: default
spec:
  hosts:
    - hostnames:
        - "foo.com"
      rules:
        - match:
            path: /bar
          action:
            forwardTo:
              resource: Service
              group: core
              name: my-service

kind: GatewayClass
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: acme-lb
controller: acme.io/gateway-controller
parameters:
  apiGroup: networking.acme.io
  kind: AcmeLBConfig
  name: acme-lb-config
---
kind: Gateway
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: my-gateway
  namespace: default
spec:
  class: acme-lb
  listeners:  # Use GatewayClass defaults for listener definition.
  - name: my-http-listener
    protocol: HTTP
  routes:
    namespaceSelector: {}
    routeSelector:
      matchLabels:
        "app": "foo"
---
kind: HTTPRoute
apiVersion: networking.x.k8s.io/v1alpha1
metadata:
  name: http-app-1
  namespace: default
  labels:
    app: foo
spec:
  hosts:
    - hostnames:
        - "foo.com"
      rules:
        - match:
            path: /bar
          action:
            forwardTo:
              resource: Service
              group: core
              name: my-service

Fix route selectors for the basic example
Fix route selectors for the basic example

Change namespaceSelector to empty value, since empty string is not a valid key.
Add routeSelector with simple example of matchLabels.
Add same labels value to HTTPRoute in order to match gateway's routeSelector.