<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> 
        <base href="https://issues.jboss.org"> 
        <title>Message Title</title> 
    </head> 
    <body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429"> 
        <table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt" bgcolor="#f5f5f5"> 
            <!-- header here --> 
            <tbody>
                <tr> 
                    <td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px"> 
                        <table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="https://static.jboss.org/developer/gravatar/bd1946aafd256fc8796cd927befe1353?d=mm&amp;s=48" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td> 
                                    <td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="cmacedo86" id="email_cmacedo86" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=cmacedo86" style="color:#0052cc;; color: #3b73af; text-decoration: none">Camila Macedo</a> <strong>edited a comment</strong> on <a href="https://issues.jboss.org/browse/AEROGEAR-8990" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-00d9ca8d-ee7e-4538-9042-ca037799fd5a" height="16" width="16" border="0" align="absmiddle" alt="Task"> AEROGEAR-8990</a> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px"> 
                        <table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate"> 
                            <tbody>
                                <tr> 
                                    <!-- there needs to be content in the cell for it to render in some clients --> 
                                    <td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://issues.jboss.org/browse/AEROGEAR-8990" style="color: #3b73af; text-decoration: none">Re: Impl to get automatically clusterHost IP</a> </span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td id="text-paragraph-pattern-top" class="email-content-main mobile-expand  comment-top-special-margin comment-top-pattern" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff"> 
                                        <table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px"> 
                                            <tbody>
                                                <tr> 
                                                    <td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0; padding-top: 10px"> <span class="diffcontext">*Following the progress on this task*<br><br>h4. Regards get the cluster IP and protocol automatically via ks8 api:<br><br>The following works when the project is executed with the command "make run-local" but not when the operator is deployed by the image, using the command "make create-all" the IP returned is not the master one.&nbsp;&nbsp;<br><br>{code:java}<br>func getClusterProtocol() string {<br> cfg, _:= config.GetConfig()<br> cfgHost := cfg.Host<br> cfgHost = strings.Replace(cfgHost, "//", "", 2)<br> host := strings.Split(cfgHost, ":")<br><br> return host[0]<br>}<br><br><br>func getHostIP() string {<br> cfg, _:= config.GetConfig()<br> cfgHost := cfg.Host<br> cfgHost = strings.Replace(cfgHost, "//", "", 2)<br> host := strings.Split(cfgHost, ":")<br><br> return host[1]<br>}<br><br>{code}<br> <br>h4. Tests with suggestion<br><br>* Tests doing exactly the same of the code suggested by [~weil] [here|https://github.com/linzhuangrong/prometheus-operator/blob/9874ab3427f7395b57b1fd696f24ca52ff928f55/test/framework/ingress.go#L24]<br>* See [here|https://issues.jboss.org/browse/AEROGEAR-8990?focusedCommentId=13724577&amp;page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-13724577], the OCP did not create the router based on the ingress source generated. <br>* Also, shows that this is just used to test the operator and not to expose the service on it. <br>* Shows that prometheus is using the host as we are doing. See [here|https://github.com/linzhuangrong/prometheus-operator/blob/9874ab3427f7395b57b1fd696f24ca52ff928f55/helm/alertmanager/templates/ingress.yaml#L24] and asking for setup the host see [here|https://github.com/linzhuangrong/prometheus-operator/blob/9874ab3427f7395b57b1fd696f24ca52ff928f55/helm/grafana/README.md#L47]<br>* Prometheus shows expose the services by shell too see [here|https://github.com/linzhuangrong/prometheus-operator/blob/9874ab3427f7395b57b1fd696f24ca52ff928f55/helm/grafana/templates/NOTES.txt#L11]<br><br>h4. Looking for examples. <br><br>*NOTE: Shows that all operators are informing the host and it is a config value made by the user, or the expose of the service is made manually by shell*<br><br>* Integr8ly is informing the host as we are doing here. See [here|https://github.com/integr8ly/gitea-operator/blob/9b58cafe5e57b28606fafb569fbd0b2928021af2/templates/gitea-ingress.yaml#L10] and [here|https://github.com/integr8ly/gitea-operator/blob/9b58cafe5e57b28606fafb569fbd0b2928021af2/templates/gitea-config.yaml#L31]<br><br>* The WordPress operator shows request the domain definition for the host too. See [here|https://github.com/presslabs/wordpress-operator/blob/55cede40032a0f6a4188239cf394afc8dbcf6ba2/chart/wordpress-operator/templates/crds.yaml#L100] and [here|https://github.com/presslabs/wordpress-operator/blob/1d285e7cff886ac42fe88a9ec742b824b3c05e17/pkg/controller/wordpress/internal/sync/ingress.go#L66]<br><br>* This one is informing the domain too. [here|https://github.com/infinimesh/operator/blob/72eedaa87d5feb12eedc676fd38780c79593602e/pkg/controller/platform/apiserver_rest.go#L128] and [here|https://github.com/infinimesh/operator/blob/f77e95bc90f944af9197458a2e939149001a9e1c/config/samples/infinimesh_v1beta1_platform.yaml#L14]<br><br>* The vault.operator shows also requiring the host. See [here|https://github.com/coreos/vault-operator/blob/9f310f12f67d3080e16d1fa5dc0d345aa543a966/doc/user/tectonic/ingress.md#L3] and [here|https://github.com/coreos/vault-operator/blob/9f310f12f67d3080e16d1fa5dc0d345aa543a966/doc/user/tectonic/vault-ui.md#L40]<br><br>* The CrunchyData shows request to the user create the ingress/route manually. See [here|https://github.com/CrunchyData/postgres-operator/blob/7e867ebf211b488def26dfaf10d7b2b5bbd6f5f6/hugo/content/Installation/_index.md#pgo-cli-installation]<br> <br>h4.NOTES:<br><br></span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;">Shows that the easier way is :<br></span> <span class="diffcontext">*</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;"> Replace</span> <span class="diffaddedchars" style="background-color:#ddfade;"> If we keep</span> <span class="diffcontext"> the</span> <span class="diffaddedchars" style="background-color:#ddfade;"> spec we should replace the</span> <span class="diffcontext"> name clusterIP for Hostname and describe that it is the IP and/or the hostname to make clear</span> <span class="diffremovedchars" style="background-color:#ffe7e7;text-decoration:line-through;"><br>* Create</span> <span class="diffaddedchars" style="background-color:#ddfade;"> and create</span> <span class="diffcontext"> a make command to get it automatically via shell script. <br><br></span> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <tr> 
                                    <td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff"> 
                                        <table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0"> 
                                                        <table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                                            <tbody>
                                                                <tr> 
                                                                    <td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0; vertical-align: middle"> <a href="https://issues.jboss.org/browse/AEROGEAR-8990#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-4a40d6fe-9ed8-437c-b1b7-00664b855016" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td> 
                                                                    <td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://issues.jboss.org/browse/AEROGEAR-8990#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td> 
                                                                </tr> 
                                                            </tbody>
                                                        </table> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                                <!-- there needs to be content in the cell for it to render in some clients --> 
                                <tr> 
                                    <td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff">&nbsp;</td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
                <tr> 
                    <td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px"> 
                        <table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                            <tbody>
                                <tr> 
                                    <td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian Jira <span id="footer-build-information">(v7.12.1#712002-<span title="609a50578ba6bc73dbf8b05dddd7c04a04b6807c" data-commit-id="609a50578ba6bc73dbf8b05dddd7c04a04b6807c}">sha1:609a505</span>)</span> </td> 
                                    <td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top"> 
                                        <table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt"> 
                                            <tbody>
                                                <tr> 
                                                    <td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="https://issues.jboss.org/images/mail/atlassian-email-logo.png" alt="Atlassian logo" title="Atlassian logo" width="191" height="24" class="image_fix"> </td> 
                                                </tr> 
                                            </tbody>
                                        </table> </td> 
                                </tr> 
                            </tbody>
                        </table> </td> 
                </tr> 
            </tbody>
        </table>   
    </body>
</html>