openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-openwhisk-deploy-kube] chetanmeh opened a new pull request #493: Configure same affinity policies as array
Date Fri, 05 Jul 2019 05:28:14 GMT
chetanmeh opened a new pull request #493: Configure same affinity policies as array
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/493
 
 
   Currently affinity value are getting duplicated and override the values. For example rendering
the controller-pod.yaml
   
   ```
   helm template  openwhisk --name bladerunner -x templates/controller-pod.yaml  --output-dir
../build
   ```
   
   Renders the yaml with following content
   
   ```yaml
         serviceAccountName: bladerunner-core
         restartPolicy: Always
         affinity:
           # prefer to not run on an invoker node (only prefer because of single node clusters)
           nodeAffinity:
             preferredDuringSchedulingIgnoredDuringExecution:
             - weight: 100
               preference:
                 matchExpressions:
                 - key: openwhisk-role
                   operator: NotIn
                   values:
                   - invoker
           # prefer to run on a core node
           nodeAffinity:
             preferredDuringSchedulingIgnoredDuringExecution:
             - weight: 80
               preference:
                 matchExpressions:
                 - key: openwhisk-role
                   operator: In
                   values:
                   - core
           # Fault tolerance: prevent multiple instances of bladerunner-controller from running
on the same node
           podAntiAffinity:
             requiredDuringSchedulingIgnoredDuringExecution:
             - labelSelector:
                 matchExpressions:
                 - key: name
                   operator: In
                   values:
                   - bladerunner-controller
               topologyKey: "kubernetes.io/hostname"
   
         initContainers:
   ```
   
   As can be seen that under `affinity` there are 2 entries for `nodeAffinity` which would
result in last one overwriting the first one. 
   
   Ideally this should be flagged in `helm lint` however it looks like this check is missing
per helm/helm#5524

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message