DaanHoogland commented on a change in pull request #3680: [WIP: DO NOT MERGE]
CloudStack Kubernetes Service
URL: https://github.com/apache/cloudstack/pull/3680#discussion_r367947474
##########
File path:
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/version/KubernetesVersionManagerImpl.java
##########
@@ -163,47 +169,15 @@ private VirtualMachineTemplate
registerKubernetesVersionIso(final String version
f.setAccessible(true);
f.set(registerIsoCmd, isoChecksum);
}
+ f = registerIsoCmd.getClass().getDeclaredField("accountName");
+ f.setAccessible(true);
+ f.set(registerIsoCmd,
accountManager.getSystemAccount().getAccountName());
+ f = registerIsoCmd.getClass().getDeclaredField("domainId");
+ f.setAccessible(true);
+ f.set(registerIsoCmd, accountManager.getSystemAccount().getDomainId());
return templateService.registerIso(registerIsoCmd);
}
Review comment:
I must have mist this before, but i would add setters or add an appropriate
constructor instead of this tinkering with access.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services