def _get_init_containers(self):
<EOL>if self.kube_config.dags_volume_claim orself.kube_config.dags_volume_host or self.kube_config.dags_in_image:<EOL><INDENT>return []<EOL><DEDENT>init_environment = [{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_repo<EOL>}, {<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_branch<EOL>}, {<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_sync_root<EOL>}, {<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_sync_dest<EOL>}, {<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT:1>'<EOL>}, {<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT:true>'<EOL>}]<EOL>if self.kube_config.git_user:<EOL><INDENT>init_environment.append({<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_user<EOL>})<EOL><DEDENT>if self.kube_config.git_password:<EOL><INDENT>init_environment.append({<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': self.kube_config.git_password<EOL>})<EOL><DEDENT>volume_mounts = [{<EOL>'<STR_LIT>': self.kube_config.git_sync_root,<EOL>'<STR_LIT:name>': self.dags_volume_name,<EOL>'<STR_LIT>': False<EOL>}]<EOL>if self.kube_config.git_ssh_key_secret_name:<EOL><INDENT>volume_mounts.append({<EOL>'<STR_LIT:name>': self.git_sync_ssh_secret_volume_name,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>})<EOL>init_environment.extend([<EOL>{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT>'<EOL>},<EOL>{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT:true>'<EOL>}])<EOL><DEDENT>if self.kube_config.git_ssh_known_hosts_configmap_name:<EOL><INDENT>volume_mounts.append({<EOL>'<STR_LIT:name>': self.git_sync_ssh_known_hosts_volume_name,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>})<EOL>init_environment.extend([<EOL>{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT:true>'<EOL>},<EOL>{<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT>'<EOL>}<EOL>])<EOL><DEDENT>else:<EOL><INDENT>init_environment.append({<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:value>': '<STR_LIT:false>'<EOL>})<EOL><DEDENT>return [{<EOL>'<STR_LIT:name>': self.kube_config.git_sync_init_container_name,<EOL>'<STR_LIT:image>': self.kube_config.git_sync_container,<EOL>'<STR_LIT>': {'<STR_LIT>': <NUM_LIT>},  <EOL>'<STR_LIT>': init_environment,<EOL>'<STR_LIT>': volume_mounts<EOL>}]<EOL>
When using git to retrieve the DAGs, use the GitSync Init Container