You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by GitBox <gi...@apache.org> on 2022/07/02 19:06:33 UTC

[GitHub] [brooklyn-server] geomacy commented on a diff in pull request #1329: Added support for pull policy and docs

geomacy commented on code in PR #1329:
URL: https://github.com/apache/brooklyn-server/pull/1329#discussion_r912391592


##########
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:
   > [ahgittin](https://github.com/ahgittin) [2 days ago](https://github.com/apache/brooklyn-server/pull/1329#discussion_r910735955)  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!)
   
   That was my thought.
   
   > [iuliana](https://github.com/iuliana) [2 days ago](https://github.com/apache/brooklyn-server/pull/1329#discussion_r911071862)
   @geomacy Added enum for imagePullPolicy that validates the value, before the task is even created.
   
   looks great thanks @iuliana 



-- 
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: dev-unsubscribe@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org