@Override
    public List<ManifestSnippet> build(ManifestContext manifestContext, ServiceSpec serviceSpec) throws JsonProcessingException, HyscaleException {
        List<ManifestSnippet> secretSnippets = new ArrayList<>();
        List<Agent> agents = getAgents(serviceSpec);
        String serviceName = serviceSpec.get(HyscaleSpecFields.name,String.class);
        if(agents == null){
            return secretSnippets;
        }
        for (Agent agent : agents) {
            Secrets secrets = agent.getSecrets();
            if (secrets == null) {
                continue;
            }
            String secretName = agentManifestNameGenerator.generateSecretName(agent.getName(),serviceName);
            secretSnippets.addAll(createSecretSnippet(secretName,manifestContext,serviceSpec));
            String secretsVolumePath = agent.getSecretsVolumePath();
            ManifestSnippet secretSnippet = SecretsDataUtil.build(secrets, secretsVolumePath, ManifestGenConstants.DEFAULT_SECRETS_FILE);
            SecretsDataUtil.updatePodChecksum(secretSnippet, manifestContext, agent.getName());
            if (secretSnippet != null) {
                secretSnippet.setName(secretName);
                secretSnippets.add(secretSnippet);
            }
        }
        return secretSnippets;
    }
Secrets manifest snippet builder for agents.
<p>
This class is responsible for building manifest snippets related to secrets
for agents.
</p>
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/utils/AgentSecretBuilder.java