You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/11 21:38:26 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #13516: Add verify_ssl config for kubernetes

mik-laj commented on a change in pull request #13516:
URL: https://github.com/apache/airflow/pull/13516#discussion_r555356541



##########
File path: airflow/kubernetes/kube_client.py
##########
@@ -123,5 +128,8 @@ def get_kube_client(
     if conf.getboolean('kubernetes', 'enable_tcp_keepalive', fallback=False):
         _enable_tcp_keepalive()
 
+    if not conf.getboolean('kubernetes', 'verify_ssl', fallback=True):
+        _disable_verify_ssl()
+
     client_conf = _get_kube_config(in_cluster, cluster_context, config_file)
     return _get_client_with_patched_configuration(client_conf)

Review comment:
       ```suggestion
       if not conf.getboolean('kubernetes', 'verify_ssl', fallback=True):
           configuration.verify_ssl = False
   
       client_conf = _get_kube_config(in_cluster, cluster_context, config_file)
       if conf.getboolean('kubernetes', 'verify_ssl', fallback=True):
           
       return _get_client_with_patched_configuration(client_conf)
   ```
   It seems to me that in this way we will avoid modifying the global configuration.




----------------------------------------------------------------
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