You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/12 07:26:39 UTC

[GitHub] [cloudstack-primate] davidjumani opened a new pull request #800: kubernetesservicetab: Selecting the right ip

davidjumani opened a new pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800


   Fixes KubernetesServiceTab from picking up the first ip in the list of all ips
   In the listKubernetesCluster response, there is no field associatednetworkid but only network id. KubernetesServiceTab tries to read associatednetworkid instead of networkid which results in all the ip addresses being returned, and in turn selects the first one. This PR fixes it by ensuring the right network is selected and then selects the source nat ip which has all the associated FW, PF and LB rules


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] davidjumani commented on a change in pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
davidjumani commented on a change in pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#discussion_r503924846



##########
File path: src/views/compute/KubernetesServiceTab.vue
##########
@@ -327,14 +327,14 @@ export default {
           this.resource.projectid !== '') {
           params.projectid = this.resource.projectid
         }
-        if (this.isValidValueForKey(this.resource, 'associatednetworkid')) {
-          params.associatednetworkid = this.resource.associatednetworkid
+        if (this.isValidValueForKey(this.resource, 'networkid')) {
+          params.associatednetworkid = this.resource.networkid
         }
       }
       api('listPublicIpAddresses', params).then(json => {
         const ips = json.listpublicipaddressesresponse.publicipaddress
         if (this.arrayHasItems(ips)) {
-          this.publicIpAddress = ips[0]
+          this.publicIpAddress = ips.filter(x => x.issourcenat)[0]

Review comment:
       From what I've seen, it does use the source nat ip of the network
   https://github.com/apache/cloudstack/blob/master/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterStartWorker.java#L376




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] davidjumani commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-706931430


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] davidjumani commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-707718480


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-708242343


   Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
   QA: http://primate-qa.cloudstack.cloud:8080/client/pr/800 (JID-3586)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-707718967


   @davidjumani a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-708237921


   @davidjumani a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
rhtyd commented on a change in pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#discussion_r503121949



##########
File path: src/views/compute/KubernetesServiceTab.vue
##########
@@ -327,14 +327,14 @@ export default {
           this.resource.projectid !== '') {
           params.projectid = this.resource.projectid
         }
-        if (this.isValidValueForKey(this.resource, 'associatednetworkid')) {
-          params.associatednetworkid = this.resource.associatednetworkid
+        if (this.isValidValueForKey(this.resource, 'networkid')) {
+          params.associatednetworkid = this.resource.networkid
         }
       }
       api('listPublicIpAddresses', params).then(json => {
         const ips = json.listpublicipaddressesresponse.publicipaddress
         if (this.arrayHasItems(ips)) {
-          this.publicIpAddress = ips[0]
+          this.publicIpAddress = ips.filter(x => x.issourcenat)[0]

Review comment:
       Does this break on shared networks, are shared networks supported for CKS @shwstppr? What about VPCs? 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] shwstppr commented on a change in pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#discussion_r503880066



##########
File path: src/views/compute/KubernetesServiceTab.vue
##########
@@ -327,14 +327,14 @@ export default {
           this.resource.projectid !== '') {
           params.projectid = this.resource.projectid
         }
-        if (this.isValidValueForKey(this.resource, 'associatednetworkid')) {
-          params.associatednetworkid = this.resource.associatednetworkid
+        if (this.isValidValueForKey(this.resource, 'networkid')) {
+          params.associatednetworkid = this.resource.networkid
         }
       }
       api('listPublicIpAddresses', params).then(json => {
         const ips = json.listpublicipaddressesresponse.publicipaddress
         if (this.arrayHasItems(ips)) {
-          this.publicIpAddress = ips[0]
+          this.publicIpAddress = ips.filter(x => x.issourcenat)[0]

Review comment:
       @davidjumani as Rohit pointed this might break for shared networks as we don't need source NAT for k8s cluster. Were you able to test that?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] blueorangutan commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-707723642


   Packaging result: :heavy_check_mark:centos :heavy_check_mark:debian :heavy_check_mark:archive.
   QA: http://primate-qa.cloudstack.cloud:8080/client/pr/800 (JID-3584)


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] rhtyd merged pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
rhtyd merged pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] davidjumani commented on pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
davidjumani commented on pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#issuecomment-708237486


   @blueorangutan package


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [cloudstack-primate] shwstppr commented on a change in pull request #800: kubernetesservicetab: Selecting the right ip

Posted by GitBox <gi...@apache.org>.
shwstppr commented on a change in pull request #800:
URL: https://github.com/apache/cloudstack-primate/pull/800#discussion_r503870382



##########
File path: src/views/compute/KubernetesServiceTab.vue
##########
@@ -327,14 +327,14 @@ export default {
           this.resource.projectid !== '') {
           params.projectid = this.resource.projectid
         }
-        if (this.isValidValueForKey(this.resource, 'associatednetworkid')) {
-          params.associatednetworkid = this.resource.associatednetworkid
+        if (this.isValidValueForKey(this.resource, 'networkid')) {
+          params.associatednetworkid = this.resource.networkid
         }
       }
       api('listPublicIpAddresses', params).then(json => {
         const ips = json.listpublicipaddressesresponse.publicipaddress
         if (this.arrayHasItems(ips)) {
-          this.publicIpAddress = ips[0]
+          this.publicIpAddress = ips.filter(x => x.issourcenat)[0]

Review comment:
       @rhtyd we support shared network. VPC isn't supported at the moment




----------------------------------------------------------------
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:
users@infra.apache.org