@Override
    public List<ManifestSnippet> build(ManifestContext manifestContext, ServiceSpec serviceSpec) throws JsonProcessingException, HyscaleException {
        List<Agent> agents = getAgents(serviceSpec);
        String serviceName = serviceSpec.get(HyscaleSpecFields.name,String.class);
        List<ManifestSnippet> configMapSnippets = new ArrayList<>();
        if(agents == null){
            return configMapSnippets;
        }
        for (Agent agent : agents) {
            if(agent.getProps() == null || agent.getProps().isEmpty()){
                continue;
            }
            String configMapName = agentManifestNameGenerator.generateConfigMapName(agent.getName(),serviceName);
            configMapSnippets.addAll(createConfigMapSnippet(configMapName,manifestContext,serviceSpec));
            Props props = new Props();
            props.setProps(agent.getProps());
            String propsVolumePath = agent.getPropsVolumePath();
            List<ManifestSnippet> agentConfigMapSnippets = ConfigMapDataUtil.build(props,propsVolumePath);
            ConfigMapDataUtil.updatePodChecksum(agentConfigMapSnippets, manifestContext, agent.getName());
            agentConfigMapSnippets.forEach(manifestSnippet -> manifestSnippet.setName(configMapName));
            configMapSnippets.addAll(agentConfigMapSnippets);
        }
        return configMapSnippets;
    }
Config map manifest snippet builder for agents.
<p>
This class is responsible for building manifest snippets related to config maps
for agents.
</p>
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/utils/AgentConfigMapBuilder.java