rmaucher commented on a change in pull request #243: Improved CloudMembershipService documentation and configuration URL: https://github.com/apache/tomcat/pull/243#discussion_r380040258
########## File path: java/org/apache/catalina/tribes/membership/cloud/DNSMembershipProvider.java ########## @@ -30,6 +30,61 @@ import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; +/** + * A {@link org.apache.catalina.tribes.MembershipProvider} that uses DNS to retrieve the members of a cluster.<br> + * + * <p> + * <strong>Configuration example for Kubernetes</strong> + * </p> + * + * {@code server.xml } + * + * <pre> + * {@code + * <Server ... + * + * <Service ... + * + * <Engine ... + * + * <Host ... + * + * <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"> + * <Channel className="org.apache.catalina.tribes.group.GroupChannel"> + * <Membership className="org.apache.catalina.tribes.membership.cloud.CloudMembershipService" + * membershipProviderClassName="org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider"/> + * </Channel> + * </Cluster> + * ... + * } + * </pre> + * + * {@code dns-membership-service.yml } + * + * <pre> + * {@code + * apiVersion: v1 Review comment: One uses rhe Kubernetes API and parses the JSON, the other one is "lightweight" and does the same with a DNS hack request. Personally, I have found the DNS technique wasn't so reliable, so I don't like it. But this is "recommended" as the proper way (access to the REST API) needs security tuning. At line 150, it uses Kubernetes logging message because the two do the same thing and run into the same error. If you would want a separate key "because", feel free to "fix" 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org