Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

Investigation and Fix Plan

  • Understand the issue: Homepage's ArgoCD widget fails with ENOTFOUND error for argocd.rohu-shark.ts.net
  • Locate the problematic configuration in ansible/roles/homepage_deploy/templates/ingresses/argocd-homepage-ingress.yml.j2
  • Fix the widget URL to use cluster-local service name instead of Tailscale URL
  • Add a variable to make the ArgoCD widget URL configurable
  • Update defaults to use cluster-local URL
  • Update to use full form URL (http://argocd-server.argocd.svc.cluster.local)
  • Test the changes with yamllint
  • Document the fix and rationale
  • Run code review (no issues found)
  • Run security check (no issues found)
  • Address feedback - use full cluster-local service URL format

Summary

Problem: Homepage's ArgoCD widget was failing with DNS resolution error (ENOTFOUND) when trying to connect to argocd.rohu-shark.ts.net.

Root Cause: Homepage runs inside the k3s cluster and cannot resolve Tailscale hostnames. The widget URL was hardcoded to use the external Tailscale URL.

Solution:

  • Separated widget URL from server URL in the argocd_homepage_token role
  • Server URL (argocd_homepage_token_server_url) remains as Tailscale URL for external CLI access
  • New widget URL (argocd_homepage_token_widget_url) uses full cluster-local service URL: http://argocd-server.argocd.svc.cluster.local
  • Updated Homepage deployment to use the cluster-local widget URL

Files Modified:

  • ansible/roles/argocd_homepage_token/meta/argument_specs.yml - Added widget_url parameter
  • ansible/roles/argocd_homepage_token/defaults/main.yml - Added widget_url with full cluster URL
  • ansible/roles/argocd_homepage_token/tasks/main.yml - Exposed widget_url in artifacts
  • ansible/roles/homepage_deploy/meta/argument_specs.yml - Added argocd_widget_url parameter
  • ansible/roles/homepage_deploy/defaults/main.yml - Added argocd_widget_url with full cluster URL
  • ansible/roles/homepage_deploy/templates/ingresses/argocd-homepage-ingress.yml.j2 - Use variable instead of hardcoded URL
  • ansible/playbooks/coachlight-infra-stack.yml - Pass widget_url from artifacts with full cluster URL
Original prompt

This section details on the original issue you should resolve

<issue_title>Investigate why Homepage Argo integration is still failing</issue_title>
<issue_description>Homepage's ArgoCD widget is throwing:

    API Error: Unknown error
    URL: https://argocd.rohu-shark.ts.net/api/v1/applications
    Raw Error:
    {
        "errno": -3008,
        "code": "ENOTFOUND",
        "syscall": "getaddrinfo",
        "hostname": "argocd.rohu-shark.ts.net"
    }

Investigate what is misconfigured in ansible/roles/argocd_homepage_token.

Keep in mind that this is a k3s cluster, with the Tailscale operator deployed, but at the end of the day, Homepage and ArgoCD also have local cluster access to each other. Not sure if that address should be the tailnet address, or something more like argocd-server.argocd.svc.cluster.local</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 10, 2025 05:36
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
The Homepage widget was failing with ENOTFOUND error because it was
configured to use the Tailscale URL (argocd.rohu-shark.ts.net) which
is not accessible from within the cluster.

Changes:
- Added argocd_homepage_token_widget_url variable for cluster-local URL
- Updated homepage_deploy to use the widget URL from artifacts
- Default widget URL is now http://argocd-server.argocd (cluster-local)
- Server URL remains as Tailscale URL for CLI login from outside cluster

Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate ArgoCD integration issue on Homepage Fix ArgoCD Homepage widget DNS resolution by using cluster-local service URL Dec 10, 2025
Copilot AI requested a review from SRF-Audio December 10, 2025 05:41
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot all addresses should be in the full form http://argocd-server.argocd.svc.cluster.local

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use full form http://argocd-server.argocd.svc.cluster.local in commit a1877a9.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot same: fix the address form.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed to use full form http://argocd-server.argocd.svc.cluster.local in commit a1877a9.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot and here: fix the address format.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use full form http://argocd-server.argocd.svc.cluster.local in commit a1877a9.

Copilot AI and others added 2 commits December 27, 2025 20:15
Updated all ArgoCD widget URLs from short form (http://argocd-server.argocd)
to full form (http://argocd-server.argocd.svc.cluster.local) as requested.

Files updated:
- ansible/roles/argocd_homepage_token/defaults/main.yml
- ansible/roles/homepage_deploy/defaults/main.yml
- ansible/playbooks/coachlight-infra-stack.yml

Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Co-authored-by: SRF-Audio <16975040+SRF-Audio@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate why Homepage Argo integration is still failing

2 participants