You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/07/07 02:46:32 UTC

[GitHub] [incubator-apisix] houshunwei opened a new pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

houshunwei opened a new pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808


   
   ### Summary
   
   1. add comment for etcd operator which is the common way to use etcd in k8s. 
   2. add service-monitor yaml which is useful for prometheus-operator.
   
   ### Full changelog
   
   * [Improve k8s usability] 
   
   
   ### Issues resolved
   No Issue Related.
   


----------------------------------------------------------------
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] [incubator-apisix] membphis merged pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
membphis merged pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808


   


----------------------------------------------------------------
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] [incubator-apisix] houshunwei commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
houshunwei commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r452010261



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip
+
+```
+* change etcd host
+
+Following {your-namespace} should be changed to your namespace, for example `default`.
+> Mention: must use `Full Qualified Domain Name`. Short name `etcd-cluster-client` is not work.
+
+```
+etcd:
+  host:
+    - "http://etcd-cluster-client.{your-namespace}.svc.cluster.local:2379"     # multiple etcd address

Review comment:
       Cluster ip may change. So we should use service qualified name. 




----------------------------------------------------------------
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] [incubator-apisix] houshunwei commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
houshunwei commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r454129146



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip

Review comment:
       > > As far as i test, apisix/nginx do not use `/etc/resolv.conf` by default.
   > > maybe another way is that let nginx read `/etc/resolv.conf`.
   > 
   > Apache APISIX will read from `/etc/resolv.conf`, if not, it will be a bug.
   
   It's not a bug, maybe by design:  in apisix bin file, it's:
   ```
   if not dns_resolver or #dns_resolver == 0 then
           local dns_addrs, err = local_dns_resolver("/etc/resolv.conf")
   ```
   only when there is no dns_resolver, apisix will read /etc/resolv.conf. I think it's ok. For in-company using, just remove  dns_resolver conf, so it can read resolv.conf.




----------------------------------------------------------------
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] [incubator-apisix] totemofwolf commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r451257216



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip
+
+```
+* change etcd host
+
+Following {your-namespace} should be changed to your namespace, for example `default`.
+> Mention: must use `Full Qualified Domain Name`. Short name `etcd-cluster-client` is not work.
+
+```
+etcd:
+  host:
+    - "http://etcd-cluster-client.{your-namespace}.svc.cluster.local:2379"     # multiple etcd address

Review comment:
       We can also use ClusterIP of service `etcd-cluster-client`




----------------------------------------------------------------
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] [incubator-apisix] houshunwei commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
houshunwei commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r452012072



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip

Review comment:
       As far as i test, apisix/nginx do not use `/etc/resolv.conf` by default.
   maybe another way is that let nginx read  `/etc/resolv.conf`.




----------------------------------------------------------------
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] [incubator-apisix] totemofwolf commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r451260000



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip

Review comment:
       We should comment this `dns_resolver`, as APISIX get the exact dns ip from pod's `/etc/resolv.conf`




----------------------------------------------------------------
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] [incubator-apisix] moonming commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
moonming commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r452285171



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip

Review comment:
       > As far as i test, apisix/nginx do not use `/etc/resolv.conf` by default.
   > maybe another way is that let nginx read `/etc/resolv.conf`.
   
   Apache APISIX will read from `/etc/resolv.conf`, if not, it will be a bug.




----------------------------------------------------------------
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] [incubator-apisix] totemofwolf commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r451257216



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip
+
+```
+* change etcd host
+
+Following {your-namespace} should be changed to your namespace, for example `default`.
+> Mention: must use `Full Qualified Domain Name`. Short name `etcd-cluster-client` is not work.
+
+```
+etcd:
+  host:
+    - "http://etcd-cluster-client.{your-namespace}.svc.cluster.local:2379"     # multiple etcd address

Review comment:
       We can also use ClusterIP of service `etcd-cluster-client` here.




----------------------------------------------------------------
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] [incubator-apisix] membphis commented on pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#issuecomment-656116811


   @houshunwei please `rebase` your branch, it was blocked by Travis CI.


----------------------------------------------------------------
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] [incubator-apisix] membphis commented on pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
membphis commented on pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#issuecomment-656687901


   @houshunwei merged, many thx


----------------------------------------------------------------
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] [incubator-apisix] totemofwolf commented on a change in pull request #1808: add etcd comment for k8s readme. add service-monitor yaml for prometh…

Posted by GitBox <gi...@apache.org>.
totemofwolf commented on a change in pull request #1808:
URL: https://github.com/apache/incubator-apisix/pull/1808#discussion_r452582361



##########
File path: kubernetes/README.md
##########
@@ -23,6 +23,27 @@ There are some yaml files for deploying apisix in Kubernetes.
 ### Prerequisites
 - Install etcd
 
+#### when using etcd-operator
+when using etcd-operator, you need to change apisix-gw-config-cm.yaml:
+
+* add CoreDNS IP into dns_resolver
+
+```
+dns_resolver:
+  - 10.233.0.3      # default coreDNS cluster ip
+
+```
+* change etcd host
+
+Following {your-namespace} should be changed to your namespace, for example `default`.
+> Mention: must use `Full Qualified Domain Name`. Short name `etcd-cluster-client` is not work.
+
+```
+etcd:
+  host:
+    - "http://etcd-cluster-client.{your-namespace}.svc.cluster.local:2379"     # multiple etcd address

Review comment:
       Cluster Ip will stay stable in it's Lifecycle,  unless you delete it. 




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