Skip to content

Adding webhook details to eventtypes CRD#3063

Merged
knative-prow-robot merged 1 commit into
knative:masterfrom
matzew:fix_2999_HEAD
Apr 30, 2020
Merged

Adding webhook details to eventtypes CRD#3063
knative-prow-robot merged 1 commit into
knative:masterfrom
matzew:fix_2999_HEAD

Conversation

@matzew
Copy link
Copy Markdown
Member

@matzew matzew commented Apr 29, 2020

Signed-off-by: Matthias Wessendorf mwessend@redhat.com

Fixes #2999

Proposed Changes

  • Adding webhook details to eventtypes CRD

Got now:

{"level":"info","ts":"2020-04-29T08:22:58.949Z","logger":"eventing-webhook","caller":"conversion/reconciler.go:104","msg":"CRD is up to date","commit":"b17b158","knative.dev/traceid":"f02aacc1-e080-4e2b-ad15-65741f0858e6","knative.dev/key":"eventtypes.eventing.knative.dev"}

Release Note

- 🐛 Fix bug adding webhook details to eventypes CRD for conversion

Docs

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 29, 2020
@knative-prow-robot knative-prow-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 29, 2020
@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 29, 2020

/assign @grantr

@grantr
Copy link
Copy Markdown
Contributor

grantr commented Apr 29, 2020

Do we need to also update the webhook conversion code?

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 30, 2020

I do not think so, @grantr

I did apply:

apiVersion: eventing.knative.dev/v1alpha1
kind: EventType
metadata:
  name: dev.knative.source.github.push
spec:
  type: dev.knative.source.github.push
  source: https://knative.dev/eventing
  broker: default

and I got:

k get eventtype.v1alpha1.eventing.knative.dev
NAME                             TYPE                             SOURCE                         SCHEMA   BROKER    DESCRIPTION   READY   REASON
dev.knative.source.github.push   dev.knative.source.github.push   https://knative.dev/eventing            default                 False   BrokerDoesNotExist

or

 k get eventtype.v1beta1.eventing.knative.dev
NAME                             TYPE                             SOURCE                         SCHEMA   BROKER    DESCRIPTION   READY   REASON
dev.knative.source.github.push   dev.knative.source.github.push   https://knative.dev/eventing            default                 False   BrokerDoesNotExist

and this:

kubectl get eventtypes dev.knative.source.github.push -oyaml
apiVersion: eventing.knative.dev/v1beta1
kind: EventType
metadata:
  annotations:
    eventing.knative.dev/creator: minikube-user
    eventing.knative.dev/lastModifier: minikube-user
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"eventing.knative.dev/v1alpha1","kind":"EventType","metadata":{"annotations":{},"name":"dev.knative.source.github.push","namespace":"default"},"spec":{"broker":"default","source":"https://knative.dev/eventing","type":"dev.knative.source.github.push"}}
  creationTimestamp: "2020-04-30T16:27:14Z"
  generation: 1
  managedFields:
  - apiVersion: eventing.knative.dev/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        .: {}
        f:conditions: {}
        f:observedGeneration: {}
    manager: controller
    operation: Update
    time: "2020-04-30T16:27:14Z"
  - apiVersion: eventing.knative.dev/v1alpha1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:kubectl.kubernetes.io/last-applied-configuration: {}
      f:spec:
        .: {}
        f:broker: {}
        f:source: {}
        f:type: {}
    manager: kubectl
    operation: Update
    time: "2020-04-30T16:27:14Z"
  name: dev.knative.source.github.push
  namespace: default
  resourceVersion: "2246"
  selfLink: /apis/eventing.knative.dev/v1beta1/namespaces/default/eventtypes/dev.knative.source.github.push
  uid: 81da1b97-88f5-4c2f-a91d-1f1357eaba2d
spec:
  broker: default
  source: https://knative.dev/eventing
  type: dev.knative.source.github.push
status:
  conditions:
  - lastTransitionTime: "2020-04-30T16:27:14Z"
    message: Broker does not exist
    reason: BrokerDoesNotExist
    status: "False"
    type: BrokerExists
  - lastTransitionTime: "2020-04-30T16:27:14Z"
    status: Unknown
    type: BrokerReady
  - lastTransitionTime: "2020-04-30T16:27:14Z"
    message: Broker does not exist
    reason: BrokerDoesNotExist
    status: "False"
    type: Ready
  observedGeneration: 1

@matzew
Copy link
Copy Markdown
Member Author

matzew commented Apr 30, 2020

Please note, I have no broker

I just tried the conversion here on a fresh cluster

Copy link
Copy Markdown
Contributor

@grantr grantr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 30, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantr, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot merged commit d6da983 into knative:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eventtypes isn't configured for webhook conversion

4 participants