-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add TopoRef struct and common functions #594
Conversation
00e666b
to
27cca91
Compare
5618886
to
f3ec112
Compare
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
8cbe0a8
to
2005db7
Compare
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
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
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, thanks!
|
||
// no Topology is passed at all or some data is missing | ||
if topologyRef == nil || (topologyRef.Name == "" || topologyRef.Namespace == "") { | ||
return ctrl.Result{}, nil |
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.
This is treated as an error on L43, but I agree it's OK to "quietly succeed" here and not return an error.
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
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
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
…mmon This patch updates the glance-operator to consume a TopologyRef struct and the related functions from lib-common [1]. This allows to avoid code duplication while spreading the pattern across the board. [1] openstack-k8s-operators/lib-common#594 Signed-off-by: Francesco Pantano <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
Allow Pod placement and scheduling to be made through the Topology CR integration introduced in [1]. - a new API parameter (TopologyRef) defined for each Component that allows to reference an existing Topology CRs in the same namespace - the operator logic that retrieves and processes the referenced Topology CR through the functions provided by lib-common [2] - StatefulSet configuration incorporates the processed Topology - a set of envTest to test the lifecycle (add/update/override/remove) of the resulting StatefulSets when a Topology is referenced webhooks are in place to prevent referencing a Topology from a different namespace (which is not supported). This patch is based on [3] by [email protected] [1] openstack-k8s-operators/infra-operator#325 [2] openstack-k8s-operators/lib-common#594 [3] openstack-k8s-operators/manila-operator#385 Jira: https://issues.redhat.com/browse/OSPRH-13274 Signed-off-by: John Fulton <[email protected]>
TopologyRef
represents a struct referenced by the service operators to retrieve aTopology
CR that is eventually processed and applied to the resultingDeployments
/StatefulSets
.This patch allows to reduce the amount of code duplication across the operators, providing both
TopologyRef
struct that can be added in the Services' API, as well asEnsureTopologyRef
andEnsureDeletedTopologyRef
where the basic logic of retrieving and managingfinalizers
is implemented.