ahgittin commented on code in PR #1329:
URL: https://github.com/apache/brooklyn-server/pull/1329#discussion_r910735955
##########
software/base/src/main/java/org/apache/brooklyn/tasks/kubectl/JobBuilder.java:
##########
@@ -121,6 +130,11 @@ public String build(){
containerSpec.setWorkingDir(workingDir);
}
containerSpec.setImage(imageName);
+ if(Strings.isNonBlank(imagePullPolicy)) {
+ if (PULL_POLICY_ALLOWED_VALUES.contains(imagePullPolicy)) {
+ containerSpec.setImagePullPolicy(imagePullPolicy);
+ } // else stick with default, do not fail
Review Comment:
agree - i'd say either:
* always set the user-supplied value, let kubectl fail if it is invalid
(good if they might add new valid args)
* or if we are going to try to duplicate enforcement, use an enum and
specify that as the type of the config key (allows type introspection to
determine valid values)
silently ignoring is going to confuse a user (esp if kubectl is case
insensitive and we just drop things that don't match our arbitrary case!)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]