insomnes commented on issue #49276:
URL: https://github.com/apache/airflow/issues/49276#issuecomment-2806248547

   I am sorry for not providing the proper example in my first comment. As 
mentioned in the issue redifinition requires you to change the class variables 
of the existing class via imports in your `airflow_local_settings.py`:
   
   ```python
   from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults
   
   PodDefaults.SIDECAR_CONTAINER.image = 
"docker.very.private.repo.net/alpine:3.10"
   ```
   
   So, your security context re-configuration should look like this, I suppose:
   
   ```python
   from airflow.providers.cncf.kubernetes.utils.xcom_sidecar import PodDefaults
   from kubernetes.client import models as k8s
   
   PodDefaults.SIDECAR_CONTAINER.security_context=k8s.V1SecurityContext(
       allow_privilege_escalation=False,
       read_only_root_filesystem=True,
       seccomp_profile=k8s.V1SeccompProfile(
           type="RuntimeDefault"
       ),
   ) 
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to