use of org.ballerinax.kubernetes.handlers.ConfigMapHandler in project kubernetes by ballerinax.
the class KubernetesAnnotationProcessor method generateConfigMaps.
private void generateConfigMaps(ConfigMapModel configMapModel, String balxFilePath, String outputDir) throws KubernetesPluginException {
String balxFileName = KubernetesUtils.extractBalxName(balxFilePath);
String configMapContent = new ConfigMapHandler(configMapModel).generate();
try {
KubernetesUtils.writeToFile(configMapContent, outputDir + File.separator + balxFileName + CONFIG_MAP_FILE_POSTFIX + YAML);
} catch (IOException e) {
throw new KubernetesPluginException("Error while writing config map content", e);
}
}
Aggregations