title: Kubernetes Python Client : update deployment spec with affinity
body: <pre><code>from kubernetes import client, config
  config.load_kube_config()
  api = client.AppsV1Api()
  
  deployment = api.read_namespaced_deployment(name='foo', namespace='bar')
  
  </code></pre>
  <p>i tried to add affinity object to deployment spec i got this error</p>
  <pre><code>deployment.spec.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms = [{'nodeSelectorTerms':[{'matchExpressions':[{'key': 'kubernetes.io/hostname','operator': 'NotIn','values': [&quot;awesome-node&quot;]}]}]}]
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  AttributeError: 'V1DeploymentSpec' object has no attribute 'affinity'
  </code></pre>