Damans227 commented on code in PR #13592:
URL: https://github.com/apache/cloudstack/pull/13592#discussion_r3614797592
##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java:
##########
@@ -761,6 +761,25 @@ protected void copyScriptFile(String nodeAddress, final
int sshPort, File file,
}
}
+ /**
+ * Deletes the local temporary copies of the scripts created by {@link
#retrieveScriptFiles()}
+ * once they have been copied to the cluster node(s). Without this, every
deploy/autoscale/PV-cleanup
+ * action leaks a *.sh file in the management server's tmp directory.
+ */
+ protected void cleanupScriptFiles() {
Review Comment:
Nit: could this loop over a list of the 5 fields instead of calling
`deleteScriptFileQuietly` 5 times by hand? Would be one line instead of five,
and less to update if a new script field gets added later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]