-
Notifications
You must be signed in to change notification settings - Fork 68
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
Update examples for Tanzu Sources for Knative #1080
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also change the Trigger
s in:
- https://github.com/vmware-samples/vcenter-event-broker-appliance/blob/development/examples/knative/go/kn-go-tagging/function.yaml
- https://github.com/vmware-samples/vcenter-event-broker-appliance/blob/development/examples/knative/go/kn-go-preemption/function.yaml
- https://github.com/vmware-samples/vcenter-event-broker-appliance/blob/development/examples/knative/go/kn-go-nsx-tag-sync/function.yaml
@@ -60,7 +60,7 @@ spec: | |||
broker: default | |||
filter: | |||
attributes: | |||
subject: com.vmware.cis.tagging.attach | |||
subject: com.vmware.vsphere.com.vmware.cis.tagging.attach.v0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subject: com.vmware.vsphere.com.vmware.cis.tagging.attach.v0 | |
type: com.vmware.vsphere.com.vmware.cis.tagging.attach.v0 |
same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to change subject
to type
;)
@@ -47,15 +47,15 @@ def handler(): | |||
resp.status_code = sc | |||
return resp | |||
|
|||
if subject in ["DrsVmPoweredOnEvent", "VmPoweredOnEvent"]: | |||
if type in ["DrsVmPoweredOnEvent", "VmPoweredOnEvent"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types are now com.vmware.vsphere.DrsVmPoweredOnEvent.v0
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updatd
app.logger.info(f"Apply attribute > {attr_last_poweredon.name}") | ||
vc_s.set_custom_attr( | ||
entity=vm_obj, | ||
key=attr_last_poweredon.key, | ||
value=date.today().strftime("%d/%m/%Y") | ||
) | ||
|
||
if subject in ["VmCreatedEvent", "VmClonedEvent", "VmRegisteredEvent"]: | ||
if type in ["VmCreatedEvent", "VmClonedEvent", "VmRegisteredEvent"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -0,0 +1,10 @@ | |||
apiVersion: projectcontour.io/v1alpha1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are those files supposed to be in here? looks like you based this PR off on the other PR instead of development
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I figured since this has to go in, that I'd simply base it off of prior PR. I guess best to do it from Development in future and just rebase ... Noted
@@ -60,7 +60,7 @@ spec: | |||
broker: default | |||
filter: | |||
attributes: | |||
subject: com.vmware.cis.tagging.attach | |||
subject: com.vmware.vsphere.com.vmware.cis.tagging.attach.v0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to change subject
to type
;)
@@ -44,8 +44,7 @@ spec: | |||
broker: default | |||
filter: | |||
attributes: | |||
subject: VmPoweredOffEvent | |||
type: com.vmware.event.router/event | |||
type: com.vmware.vsphere.com.vmware.cis.tagging.attach.v0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be VmPoweredOffEvent
event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops! Fixed :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes: vmware-samples#1073 Signed-off-by: William Lam <[email protected]>
Summary
This change updates all examples (include applicable) source to support Tanzu Sources for Knative which uses slightly different event schema format.
Pull Request Checklist
🚨 Please review the guidelines for contributing to this repository.
WIP
keyword in the title of your PR if you are not ready for reviewChange Type
What types of changes does your code introduce to the VMware Event Broker Appliance?
Put an
x
in all boxes that applyPlease check the type of change your PR introduces:
Resolved Issues
List of Issues closed or resolved by this PR. Add multiple
Closes
keyword followed by the issue number (e.g. Closes #ISSUE-NUMBER)Closes: #1073
Testing Verification
Additional Information
If you have any questions/comments, feel free to reach out to team on Slack #vcenter-event-broker-appliance
Thank you from the VEBA Team! 🥳