<p>I am using using  <a href="https://github.com/helm/charts/tree/master/stable/airflow" rel="noreferrer">https://github.com/helm/charts/tree/master/stable/airflow</a> helm chart and building  v1.10.8 <code>puckle/docker-airflow</code> image with kubernetes installed on it and using that image in the helm chart,
But I keep getting</p>

<pre><code>  File "/usr/local/bin/airflow", line 37, in &lt;module&gt;
    args.func(args)
  File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line 1140, in initdb
    db.initdb(settings.RBAC)
  File "/usr/local/lib/python3.7/site-packages/airflow/utils/db.py", line 332, in initdb
    dagbag = models.DagBag()
  File "/usr/local/lib/python3.7/site-packages/airflow/models/dagbag.py", line 95, in __init__
    executor = get_default_executor()
  File "/usr/local/lib/python3.7/site-packages/airflow/executors/__init__.py", line 48, in get_default_executor
    DEFAULT_EXECUTOR = _get_executor(executor_name)
  File "/usr/local/lib/python3.7/site-packages/airflow/executors/__init__.py", line 87, in _get_executor
    return KubernetesExecutor()
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/executors/kubernetes_executor.py", line 702, in __init__
    self.kube_config = KubeConfig()
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/executors/kubernetes_executor.py", line 283, in __init__
    self.kube_client_request_args = json.loads(kube_client_request_args)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
</code></pre>

<p>In my scheduler,  also as various sources advise,
I tried setting :</p>

<p><code>AIRFLOW__KUBERNETES__KUBE_CLIENT_REQUEST_ARGS: {"_request_timeout" : [60,60] }</code></p>

<p>in my helm values. that also didn't work any one have any ideas what am I missing?</p>

<p>Here's my values.yaml</p>

<pre><code>
airflow:
  image:
     repository: airflow-docker-local
     tag: 1.10.8
  executor: Kubernetes
  service:
    type: LoadBalancer
  config:
    AIRFLOW__KUBERNETES__WORKER_CONTAINER_REPOSITORY: airflow-docker-local
    AIRFLOW__KUBERNETES__WORKER_CONTAINER_TAG: 1.10.8
    AIRFLOW__KUBERNETES__WORKER_CONTAINER_IMAGE_PULL_POLICY: Never

    AIRFLOW__KUBERNETES__WORKER_SERVICE_ACCOUNT_NAME: airflow
    AIRFLOW__KUBERNETES__DAGS_VOLUME_CLAIM: airflow
    AIRFLOW__KUBERNETES__NAMESPACE: airflow
    AIRFLOW__KUBERNETES__KUBE_CLIENT_REQUEST_ARGS: {"_request_timeout" : [60,60] }

    AIRFLOW__CORE__SQL_ALCHEMY_CONN: postgresql+psycopg2://postgres:airflow@airflow-postgresql:5432/airflow

persistence:
  enabled: true
  existingClaim: ''

workers:
  enabled: false

postgresql:
  enabled: true

redis:
  enabled: false
</code></pre>

<p><strong>EDIT :</strong> </p>

<p>Various attempts to set environment variable in helm values.yaml didn't work, after that I added <em>(pay attention to double and single quotes)</em></p>

<pre><code>ENV AIRFLOW__KUBERNETES__KUBE_CLIENT_REQUEST_ARGS='{"_request_timeout" : [60,60] }'
</code></pre>

<p>to <strong>Dockerfile</strong> here : <a href="https://github.com/puckel/docker-airflow/blob/1.10.9/Dockerfile#L19" rel="noreferrer">https://github.com/puckel/docker-airflow/blob/1.10.9/Dockerfile#L19</a>
after that my <code>airflow-scheduler</code> pod starts but then I keep getting following error on my scheduler pod.</p>

<pre><code>Process KubernetesJobWatcher-9: Traceback (most recent call last): 
    File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 313, 
    in recv_into return self.connection.recv_into(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", 
    line 1840, in recv_into self._raise_ssl_error(self._ssl, result) File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", 
    line 1646, in _raise_ssl_error raise WantReadError() OpenSSL.SSL.WantReadError
</code></pre>

<p>For the helm value, the template uses a loop that places the <code>airflow.config</code> map <a href="https://github.com/helm/charts/blob/master/stable/airflow/templates/configmap-env.yaml#L43-L45" rel="nofollow noreferrer">into double quotes <code>"</code></a>. This means any <code>"</code> in a value needs to be escaped for the output templated YAML to be valid.</p>

<pre><code>airflow:
  config:
    AIRFLOW__KUBERNETES__KUBE_CLIENT_REQUEST_ARGS: '{\"_request_timeout\":60}'
</code></pre>

<p>That deploys and runs (but I haven't completed an end to end test)</p>

<p>According to <a href="https://github.com/kubernetes-client/python/issues/990" rel="nofollow noreferrer">this github issue</a>, the python scheduler SSL timeout may not be a problem as the watcher starts again after the 60 second connection timeout.</p>
