use of org.ballerinax.kubernetes.handlers.PersistentVolumeClaimHandler in project kubernetes by ballerinax.
the class KubernetesAnnotationProcessor method generatePersistentVolumeClaim.
private void generatePersistentVolumeClaim(PersistentVolumeClaimModel volumeClaimModel, String balxFilePath, String outputDir) throws KubernetesPluginException {
String balxFileName = KubernetesUtils.extractBalxName(balxFilePath);
String configMapContent = new PersistentVolumeClaimHandler(volumeClaimModel).generate();
try {
KubernetesUtils.writeToFile(configMapContent, outputDir + File.separator + balxFileName + VOLUME_CLAIM_FILE_POSTFIX + YAML);
} catch (IOException e) {
throw new KubernetesPluginException("Error while writing volume claim content", e);
}
}
Aggregations