bugfix/fix-differing-determinations-of-template-at-k8s-resource #393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The implementations out for review are used to fix differing determination of tempate at the k8s resource. The determination of the service template the k8s resource shall base on partly is implemented not that well thought out and recurring code fragments are spreaded, which increases risk of failure of logic. This makes reading and finally quick understanding of the logic that is intended to rule the determination of the service template harder and recurring calls of one and the same kind of iterations better should be avoided as well from perspective of performance.
The issue the merge request has been created for rather is in-between what might be placed as a feature and a bug than being a critical bug, but finally - especially at the point where the update of a k8s resource is implemented the way it is implemented bears risk and logic differs from other places where the routines happen as well. Following I'll list what works correct and what needs fix/improvement.
What works correct:
service_template_uuid
is not intended to get read from what comes as input from the requester/user, but is defined to be computed, which means that it gets derived from either the Kubernetes release (propertyrelease
) or the GSK version (propertygsk_version
), both optional input properties.What works not that well:
What works wrong:
Goal:
Come with a centric implementation of the base logic to avoid need to run recurring code fragments, spreaded and partly differing code fragments and fix what went wrong at the implementation used to apply the update of a k8s resource.