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

DomainMapper complains path on Adressable Knative Broker #12686

Open
matzew opened this issue Mar 1, 2022 · 14 comments
Open

DomainMapper complains path on Adressable Knative Broker #12686

matzew opened this issue Mar 1, 2022 · 14 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Issues which should be fixed (post-triage)

Comments

@matzew
Copy link
Member

matzew commented Mar 1, 2022

Following this guide:
https://knative.dev/docs/serving/services/custom-domains/

 
I set these values in the "network" ConfigMap:

...
autocreateClusterDomainClaims: "true"
defaultExternalScheme: https
domainTemplate: '{{.Name}}-{{.Namespace}}.{{.Domain}}'
ingress.class: kourier.ingress.networking.knative.dev {code}
...

So I created a DomainMapping for a Knative Broker:

apiVersion: serving.knative.dev/v1alpha1
kind: DomainMapping
metadata:
  name: default-borker.apps.my-server.somewhere.com
  namespace: default
spec:
  ref:
    name: default
    kind: Broker
    apiVersion: eventing.knative.dev/v1

But I am getting this:

...
Status:
  Address:
    URL:  default-borker.apps.my-server.somewhere.com
  Conditions:
    Last Transition Time:  2022-03-01T11:36:01Z
    Message:               autoTLS is not enabled
    Reason:                TLSNotEnabled
    Status:                True
    Type:                  CertificateProvisioned
    Last Transition Time:  2022-03-01T11:36:01Z
    Status:                True
    Type:                  DomainClaimed
    Last Transition Time:  2022-03-01T11:36:01Z
    Message:               Ingress has not yet been reconciled.
    Reason:                IngressNotConfigured
    Status:                Unknown
    Type:                  IngressReady
    Last Transition Time:  2022-03-01T11:36:01Z
    Message:               resolved URI "http://broker-ingress.knative-eventing.svc.cluster.local/default/default" contains a path
    Reason:                ResolveFailed
    Status:                False
    Type:                  Ready
    Last Transition Time:  2022-03-01T11:36:01Z
    Message:               resolved URI "http://broker-ingress.knative-eventing.svc.cluster.local/default/default" contains a path
    Reason:                ResolveFailed
    Status:                False
    Type:                  ReferenceResolved
  Observed Generation:     1
  URL:                     default-borker.apps.my-server.somewhere.com
Events:
  Type     Reason           Age                   From                      Message
  ----     ------           ----                  ----                      -------
  Normal   FinalizerUpdate  40m                   domainmapping-controller  Updated "default-borker.apps.my-server.somewhere.com" finalizers
  Warning  InternalError    2m14s (x20 over 40m)  domainmapping-controller  resolved URI "http://broker-ingress.knative-eventing.svc.cluster.local/default/default" contains a path

 
The guide does mention:

...as long as they conform to the Addressable contract...

IMO this error "contains a path" does break that

@matzew matzew added the kind/bug Categorizes issue or PR as related to a bug. label Mar 1, 2022
@matzew
Copy link
Member Author

matzew commented Mar 1, 2022

What eventually made it work is to point to the Service of the Knative Broker Ingress, like:

apiVersion: serving.knative.dev/v1alpha1
kind: DomainMapping
metadata:
  name: brokers.apps.ci-ln-ksz9nx2-72292.origin-ci-int-gce.dev.rhcloud.com
  namespace: knative-eventing
spec:
  ref:
    name: broker-ingress
    kind: Service
    apiVersion: v1

With this DomainMapping, I was able to curl the different brokers, based on their "path", like:

curl -v -X POST \
    -H "content-type: application/json"  \
    -H "ce-specversion: 1.0"  \
    -H "ce-source: curl-command"  \
    -H "ce-type: curl.demo"  \
    -H "ce-id: 123-abc"  \
    -d '{"message":"Hallo World"}' \
    https://brokers.apps.on.my.cloud.com/namespace/brokername

@matzew
Copy link
Member Author

matzew commented Mar 1, 2022

When I do it with a KafkaChannel (using a host, instead of a path), like:

---
apiVersion: serving.knative.dev/v1alpha1
kind: DomainMapping
metadata:
  name: kafka-channel-one.my-cloudy-server.com
  namespace: default
spec:
  ref:
    name: kafka-channel-one
    kind: KafkaChannel
    apiVersion: messaging.knative.dev/v1beta1

And it is ready, like:

k get kafkachannel
NAME                READY   REASON   URL                                                             AGE
kafka-channel-one   True             http://kafka-channel-one-kn-channel.default.svc.cluster.local   12m

I am getting this:

k get DomainMapping kafka-channel-one.my-cloudy-server.com -oyaml
apiVersion: serving.knative.dev/v1beta1
kind: DomainMapping
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"serving.knative.dev/v1alpha1","kind":"DomainMapping","metadata":{"annotations":{},"name":"kafka-channel-one.my-cloudy-server.com","namespace":"default"},"spec":{"ref":{"apiVersion":"messaging.knative.dev/v1beta1","kind":"KafkaChannel","name":"kafka-channel-one"}}}
    serving.knative.dev/creator: system:admin
    serving.knative.dev/lastModifier: system:admin
  creationTimestamp: "2022-03-01T14:00:06Z"
  finalizers:
  - domainmappings.serving.knative.dev
  generation: 1
  name: kafka-channel-one.my-cloudy-server.com
  namespace: default
  resourceVersion: "53229"
  uid: 64e966e6-0aa7-420f-8020-1874e0949380
spec:
  ref:
    apiVersion: messaging.knative.dev/v1beta1
    kind: KafkaChannel
    name: kafka-channel-one
    namespace: default
status:
  address:
    url: https://kafka-channel-one.my-cloudy-server.com
  conditions:
  - lastTransitionTime: "2022-03-01T14:00:07Z"
    message: autoTLS is not enabled
    reason: TLSNotEnabled
    status: "True"
    type: CertificateProvisioned
  - lastTransitionTime: "2022-03-01T14:00:07Z"
    status: "True"
    type: DomainClaimed
  - lastTransitionTime: "2022-03-01T14:00:07Z"
    message: Waiting for load balancer to be ready
    reason: Uninitialized
    status: Unknown
    type: IngressReady
  - lastTransitionTime: "2022-03-01T14:00:07Z"
    message: Waiting for load balancer to be ready
    reason: Uninitialized
    status: Unknown
    type: Ready
  - lastTransitionTime: "2022-03-01T14:00:07Z"
    status: "True"
    type: ReferenceResolved
  observedGeneration: 1
  url: https://kafka-channel-one.my-cloudy-server.com

@csantanapr
Copy link
Member

We use domain mapping in konk.dev and kn quickstart
https://github.com/csantanapr/knative-kind/blob/master/05-eventing-samples.sh

@evankanderson
Copy link
Member

You're again referencing the Kubernetes Service.

KIngress doesn't currently support the ability to rewrite the request path (AFAIK), so the "supports Addressable" appears to be a bit broken. This should probably be fixed for GA one way or the other (either by removing the "general Addressable" support, or by supporting path mappings).

@matzew
Copy link
Member Author

matzew commented Mar 2, 2022

We use domain mapping in konk.dev and kn quickstart
https://github.com/csantanapr/knative-kind/blob/master/05-eventing-samples.sh

yes, and simple things like that do work - just not broker (for the error stated in the reason).

@matzew
Copy link
Member Author

matzew commented Mar 2, 2022

You're again referencing the Kubernetes Service.

yes, as a reasonable work-around I use the actual k8s Service. and do the path fiddling for the different brokers on my end. At least something.

KIngress doesn't currently support the ability to rewrite the request path (AFAIK), so the "supports Addressable" appears to be a bit broken. This should probably be fixed for GA one way or the other (either by removing the "general Addressable" support, or by supporting path mappings).

yep, I agree - For the broker especially since they all (all implementations) do use the path strategy/approach, rather than behing an actual host (like with channels).

so the "supports Addressable" appears to be a bit broken.

yeah. I'd second that statement too 😄

@matzew
Copy link
Member Author

matzew commented Mar 4, 2022

This should probably be fixed for GA one way or the other (either by removing the "general Addressable" support, or by supporting path mappings).

I'd think that allowing path mappings is a huge benefit, so I'd def. like to see that happening

@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 3, 2022
@evankanderson
Copy link
Member

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 14, 2022
@evankanderson
Copy link
Member

This is still blocking domain-mapping GA.

@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 13, 2022
@knative-prow-robot
Copy link
Contributor

This issue or pull request is stale because it has been open for 90 days with no activity.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close

/lifecycle stale

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 15, 2022
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 15, 2023
@psschwei
Copy link
Contributor

/lifecycle frozen

@knative-prow knative-prow bot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 17, 2023
@ReToCode ReToCode added the triage/accepted Issues which should be fixed (post-triage) label Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

6 participants