private List<ManifestSnippet> createConfigMapSnippet(String configMapName, ManifestContext manifestContext, ServiceSpec serviceSpec) throws JsonProcessingException {
        String appName = manifestContext.getAppName();
        String envName = manifestContext.getEnvName();
        String serviceName = null;
        try{
            serviceName = serviceSpec.get(HyscaleSpecFields.name, String.class);
        }catch (HyscaleException e){
            logger.error("Error fetching service name from service spec",e);
        }
        List<ManifestSnippet> configMapSnippets = new ArrayList<>();
        ManifestSnippet kindSnippet = MetadataManifestSnippetGenerator.getKind(ManifestResource.CONFIG_MAP);
        kindSnippet.setName(configMapName);
        configMapSnippets.add(kindSnippet);

        ManifestSnippet apiVersionSnippet = MetadataManifestSnippetGenerator.getApiVersion(ManifestResource.CONFIG_MAP);
        apiVersionSnippet.setName(configMapName);
        configMapSnippets.add(apiVersionSnippet);

        ManifestSnippet snippet = new ManifestSnippet();
        V1ObjectMeta v1ObjectMeta = new V1ObjectMeta();
        v1ObjectMeta.setName(configMapName);
        v1ObjectMeta.setLabels(DefaultLabelBuilder.build(appName,envName,serviceName));
        snippet.setSnippet(JsonSnippetConvertor.serialize(v1ObjectMeta));
        snippet.setPath("metadata");
        snippet.setKind(ManifestResource.CONFIG_MAP.getKind());
        snippet.setName(configMapName);
        configMapSnippets.add(snippet);
        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