Fix Incorrect ArgoCD and Gitea UI URLs in README.md#267
Fix Incorrect ArgoCD and Gitea UI URLs in README.md#267nabuskey merged 4 commits intocnoe-io:mainfrom
Conversation
0c7fc17 to
221db2f
Compare
nabuskey
left a comment
There was a problem hiding this comment.
Thank you very much for this. Definitely an oversight on our part. I don't think we need to make changes for the codespaces section since codespaces provides a single domain name only.
README.md
Outdated
| * ArgoCD: `echo https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/argocd` | ||
| * Gitea: `echo https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/gitea` | ||
| * ArgoCD: `echo https://argocd.${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}` | ||
| * Gitea: `echo https://gitea.${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}` |
There was a problem hiding this comment.
This bit does not need to be changed because in Codespaces, we have to use path based routing.
There was a problem hiding this comment.
Looks like it does need this change.
I ran it is codespace which gave me this invalid link http://psychic-space-potato-gxq4q6pq4ppfwwxx-8080.app.github.dev:8080/argocd at the end to access argocd.
But the same worked when I modified the link as http://argocd.psychic-space-potato-gxq4q6pq4ppfwwxx-8080.app.github.dev:8080

I added another commit to idpbuilder/pkg/cmd/create/root.go to fix this output url. Correct me if I'm missing anything here.
There was a problem hiding this comment.
Thanks for the detailed info. I just tried it in Codespaces through my browser (Firefox) and it does work as expected. That is, I can access UIs at subpath (/argocd and /gitea) The command used was:
./idpbuilder create --protocol http \
--host ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} \
--port 8080 --use-path-routingI am surprised you can access argocd UI at argocd.<GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN>. As far as I am aware, most browsers won't let you access it because of HSTS. Are you running this in your browser?
There was a problem hiding this comment.
You're right! argocd.<GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN> is not working due to HSTS in my browser. However, <GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN>/argocd is giving 404. How are you accessing these UIs?
There was a problem hiding this comment.
https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/argocd
This should work. Note the port is the default HTTPS port 443 because this part is handled by Codespaces. My suggestion is to destroy everything and try it again.
# delete cluster. THIS WILL DELETE EVERYTHING IN CLUSTER
kind delete clusters localdev && docker system prune -f && docker volume prune -f
./idpbuilder create --protocol http --host ${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} --port 8080 --use-path-routingThere was a problem hiding this comment.
https://${CODESPACE_NAME}-8080.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN}/argocd is working for me as well.
Previously, I was using the URL provided at the end of the idpbuilder create command output (check screenshot here), which had :8080 appended at the end. Looks like this is not needed with path based routing in Codespace. I have updated the PR to reflect this finding.
There was a problem hiding this comment.
The changes to code has some unintended consequences. For example, if you are running it on your local machine with path based routing, the printed URL is incorrect:
Expected: https://cnoe.localtest.me:8443/argocd
Reality: https://cnoe.localtest.me/argocd
If you are running this in environment where it's fronted by another proxy like Codespaces, what you did is correct. But we can't assume we are fronted by another proxy whenever the --use-path-routing flag is used. This flag is valid for local machine use cases as well.
I agree that the URL printed out at the end is incorrect for Codespaces and should be fixed. Proper fix for this will involve detecting if we have a proxy in front of us.
I think we can merge this PR with changes to the README file only. We can tackle the codespaces problem in another PR and issue.
There was a problem hiding this comment.
Agreed! I din't think of that scenario. removed those changes from this PR
Signed-off-by: SupriyaNallapeta <21274175+SupriyaNallapeta@users.noreply.github.com>
Signed-off-by: Supriya Nallapeta <supriya.nallapeta@autodesk.com>
Signed-off-by: Supriya Nallapeta <supriya.nallapeta@autodesk.com>
Signed-off-by: Supriya Nallapeta <supriya.nallapeta@autodesk.com>
nabuskey
left a comment
There was a problem hiding this comment.
LGTM. Thank you very much for this PR!!
This pull request corrects the URLs for accessing the ArgoCD and Gitea UIs specified in the README. The previous URLs did not correctly reflect the actual URLs for accessing these services.
Changes made:
These changes ensure that users are directed to the correct locations when setting up their local development environment.