Pearl1594 commented on code in PR #14408:
URL: https://github.com/apache/cloudstack/pull/14408#discussion_r4286498759


##########
plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml:
##########
@@ -1,4 +1,3 @@
-## template: jinja

Review Comment:
   Yes - I believe removing this would be risky - it would effect how cni 
config if provided gets concatenated to this cloud-config. 



##########
plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml:
##########
@@ -358,7 +357,6 @@ write_files:
       sudo touch /home/cloud/success
       echo "true" > /home/cloud/success
 
-  {% if registry is defined %}

Review Comment:
   The bug in {% if registry is defined %} is because registry isn't a 
cloud-init variable. The registry details are substituted as plain text by 
updateKubeConfigWithRegistryDetails on the management server, so cloud-init 
always evaluates the condition as false. That drops setup-containerd, and the 
cluster hangs when the runcmd calls the missing script.
   
   Instead of removing the jinja header, I'd keep it and have Java substitute a 
value for the condition, as it does for {{ k8s.eject.iso }}:
   
   {% if "{{ registry.enabled }}" == "true" %} 
   
   updateKubeConfigWithRegistryDetails would replace {{ registry.enabled }} 
with true or false when it builds the userdata.



-- 
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]

Reply via email to