updated to add env flag to toggle x509 for scratch containers