-
Notifications
You must be signed in to change notification settings - Fork 32
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 webhook #529
Update webhook #529
Conversation
/hold until after freeze |
Adds calling service operator validations from within the openstack-operator for: - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Updates webhook to be able to be call from the openstack-operator webhook on the GlanceSpecCore, like for other operators in [1]. Also adds check for valid service override endpoint type on create and update. Depends-On: openstack-k8s-operators/lib-common#505 [1] https://github.com/openstack-k8s-operators/openstack-operator/blob/d2703d3a321c979dacaca95b5d4a634bf116e0db/apis/core/v1beta1/openstackcontrolplane_webhook.go#L181
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.
I didn't try this patch but from the code point of view seems correct.
I think we can improve the validation webhook tests but what we have looks ok.
|
||
// ValidateCreate - Exported function wrapping non-exported validate functions, | ||
// this function can be called externally to validate an ironic spec. | ||
func (r *GlanceSpec) ValidateCreate(basePath *field.Path) field.ErrorList { |
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.
ok I was initially concerned about changing APISpec
to APISpecCore
but I see we can still test this with a standalone glance instance and this is basically a wrapper for GlanceSpecCore.ValidateCreate
where the validation actually happens.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fmount, stuggi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Wait, I need to test it locally because I realized we don't have a test that proves we can't update the layout from single to split (or do the reverse). I'll try this locally and comment further. |
ok I checked locally and looks safe, sorry for the delay, I knew it was ok in terms of code but I wanted to test it locally to make sure we preserve the current layout. |
/lgtm |
daeab50
into
openstack-k8s-operators:main
Adds calling service operator validations from within the openstack-operator for: - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Adds calling service operator validations from within the openstack-operator for: - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Adds calling service operator validations from within the openstack-operator for: - keystone - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/keystone-operator#414 Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Adds calling service operator validations from within the openstack-operator for: - keystone - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/keystone-operator#414 Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Adds calling service operator validations from within the openstack-operator for: - keystone - barbican - neutron - glance - cinder - heat - manila - swift - octavia - designate Depends-On: openstack-k8s-operators/keystone-operator#414 Depends-On: openstack-k8s-operators/barbican-operator#115 Depends-On: openstack-k8s-operators/neutron-operator#347 Depends-On: openstack-k8s-operators/glance-operator#529 Depends-On: openstack-k8s-operators/cinder-operator#384 Depends-On: openstack-k8s-operators/heat-operator#361 Depends-On: openstack-k8s-operators/manila-operator#273 Depends-On: openstack-k8s-operators/swift-operator#218 Depends-On: openstack-k8s-operators/octavia-operator#301 Depends-On: openstack-k8s-operators/designate-operator#166
Updates webhook to be able to be call from the openstack-operator webhook on the GlanceSpecCore, like for other operators in [1].
Also adds check for valid service override endpoint type on create and update.
Depends-On: openstack-k8s-operators/lib-common#505
[1] https://github.com/openstack-k8s-operators/openstack-operator/blob/d2703d3a321c979dacaca95b5d4a634bf116e0db/apis/core/v1beta1/openstackcontrolplane_webhook.go#L181