use of org.ballerinax.kubernetes.handlers.SecretHandler in project kubernetes by ballerinax.
the class KubernetesAnnotationProcessor method generateSecrets.
private void generateSecrets(SecretModel secretModel, String balxFilePath, String outputDir) throws KubernetesPluginException {
String balxFileName = KubernetesUtils.extractBalxName(balxFilePath);
String secretContent = new SecretHandler(secretModel).generate();
try {
KubernetesUtils.writeToFile(secretContent, outputDir + File.separator + balxFileName + SECRET_FILE_POSTFIX + YAML);
} catch (IOException e) {
throw new KubernetesPluginException("Error while writing secret content", e);
}
}
Aggregations