class DefaultTaskToPodConverter implements TaskToPodConverter {

    @VisibleForTesting
    void appendS3WriterRole(TitanProtos.ContainerInfo.Builder containerInfoBuilder, Job<?> job, Task task) {
        if (!configuration.isDefaultS3WriterRoleEnabled()) {
            return;
        }

        if (LogStorageInfos.findCustomS3Bucket(job).isPresent()) {
            containerInfoBuilder.putPassthroughAttributes(
                    S3_WRITER_ROLE,
                    job.getJobDescriptor().getContainer().getSecurityProfile().getIamRole()
            );
        } else {
            Evaluators.applyNotNull(
                    configuration.getDefaultS3WriterRole(),
                    role -> containerInfoBuilder.putPassthroughAttributes(S3_WRITER_ROLE, role)
            );
        }

        logStorageInfo.getS3LogLocation(task, false).ifPresent(s3LogLocation ->
                Evaluators.applyNotNull(
                        s3LogLocation.getBucket(),
                        bucket -> containerInfoBuilder.putPassthroughAttributes(S3_BUCKET_NAME, bucket)
                )
        );
    }

    @Inject public  DefaultTaskToPodConverter(DirectKubeConfiguration configuration,
                                     PodAffinityFactory podAffinityFactory,
                                     TaintTolerationFactory taintTolerationFactory,
                                     LogStorageInfo<Task> logStorageInfo);

}