astefanutti commented on a change in pull request #2114:
URL: https://github.com/apache/camel-k/pull/2114#discussion_r593107116
##########
File path: pkg/util/kubernetes/util.go
##########
@@ -228,3 +232,37 @@ func ResolveValueSource(ctx context.Context, client
k8sclient.Reader, namespace
return "", nil
}
+
+// GetTolerations build an array of Tolerations from an array of string
+func GetTolerations(taints []string) ([]corev1.Toleration, error) {
Review comment:
Yes and no 😉.
I understand it already contains client methods for other resources, and few
other miscellaneous
methods like: `ToJSON`, `ToYAML` `ResolveValueSource` `GetSecretRefValue`.
I'd argue that the main difference is that `GetTolerations(taints []string)` is
a factory method, while the other, resources related methods, are actually
client getters. So yes, because it already breaks the single responsibility
principle and it's not a big deal :) and no because this is not a good reason
to introduce another kind of method to it 😄.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]