Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*.idpbuilder.cnoe.io.local endpoints cannot be accessed using URL #19

Closed
cmoulliard opened this issue Oct 12, 2023 · 4 comments
Closed

Comments

@cmoulliard
Copy link
Contributor

cmoulliard commented Oct 12, 2023

Issue

The *.idpbuilder.cnoe.io.local endpoints such as argocd.idpbuilder.cnoe.io.local cannot be accessed using their URL

I built locally the idpbuilder binary and executed the command to create a kind cluster but I cannot access the ingress argocd route https://argocd.idpbuilder.cnoe.io.local/ and got connection refused.

Remark: I added to my /etc/hosts/ file the following entry 127.0.0.1 argocd.idpbuilder.cnoe.io.local

Additional information

Status of the ArgoCD applications is healthy

k get application -n argocd
NAME                                       SYNC STATUS   HEALTH STATUS
idpbuilder-local-gitserver-argocd          Unknown       Healthy
idpbuilder-local-gitserver-backstage       Unknown       Healthy
idpbuilder-local-gitserver-crossplane      Unknown       Healthy
idpbuilder-local-gitserver-nginx-ingress   Unknown       Healthy

Remark : It seems that the process to install, download and store artifacts on local git is a bit slow !
So, if I execute this command later, I see that ArgoCD Sync status is progressing

k get application -n argocd
NAME                                       SYNC STATUS   HEALTH STATUS
crossplane-helm                            Unknown       Unknown
idpbuilder-local-gitserver-argocd          Synced        Healthy
idpbuilder-local-gitserver-backstage       Synced        Progressing
idpbuilder-local-gitserver-crossplane      Synced        Healthy
idpbuilder-local-gitserver-nginx-ingress   Synced        Progressing

Nevertheless, the argocd server pod is running well

time="2023-10-12T07:28:45Z" level=info msg="ArgoCD API Server is starting" built="2023-10-12T01:02:48Z" commit=7297a6c98b3a407ac2d85547d9d4f2db3af79b2e namespace=argocd port=8080 version=v2.9.0+7297a6c
time="2023-10-12T07:28:45Z" level=info msg="Starting configmap/secret informers"
time="2023-10-12T07:28:45Z" level=info msg="Configmap/secret informer synced"
time="2023-10-12T07:28:45Z" level=info msg="Initialized server signature"
time="2023-10-12T07:28:45Z" level=info msg="Initialized admin password"
time="2023-10-12T07:28:45Z" level=info msg="Starting configmap/secret informers"
time="2023-10-12T07:28:45Z" level=info msg="secrets informer cancelled"
time="2023-10-12T07:28:45Z" level=info msg="configmap informer cancelled"
time="2023-10-12T07:28:45Z" level=info msg="Configmap/secret informer synced"
time="2023-10-12T07:28:45Z" level=info msg="Initialized TLS certificate"
time="2023-10-12T07:28:45Z" level=info msg="Starting configmap/secret informers"
time="2023-10-12T07:28:45Z" level=info msg="secrets informer cancelled"
time="2023-10-12T07:28:45Z" level=info msg="configmap informer cancelled"
time="2023-10-12T07:28:46Z" level=info msg="Configmap/secret informer synced"
time="2023-10-12T07:28:46Z" level=info msg="invalidated cache for resource in namespace: argocd with the name: argocd-notifications-cm"
time="2023-10-12T07:28:46Z" level=info msg="invalidated cache for resource in namespace: argocd with the name: argocd-notifications-secret"
time="2023-10-12T07:28:46Z" level=info msg="argocd v2.9.0+7297a6c serving on port 8080 (url: , tls: true, namespace: argocd, sso: false)"
time="2023-10-12T07:28:46Z" level=info msg="Enabled application namespace patterns: argocd"

Service status

k describe svc/argocd-server -n argocd
Name:              argocd-server
Namespace:         argocd
Labels:            app.kubernetes.io/component=server
                   app.kubernetes.io/name=argocd-server
                   app.kubernetes.io/part-of=argocd
Annotations:       <none>
Selector:          app.kubernetes.io/name=argocd-server
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.96.52.92
IPs:               10.96.52.92
Port:              http  80/TCP
TargetPort:        8080/TCP
Endpoints:         10.244.1.3:8080
Port:              https  443/TCP
TargetPort:        8080/TCP
Endpoints:         10.244.1.3:8080
Session Affinity:  None
Events:            <none>

and ingress

k describe ingress/argocd-server-ingress -n argocd
Name:             argocd-server-ingress
Labels:           app.kubernetes.io/instance=idpbuilder-local-gitserver-argocd
Namespace:        argocd
Address:          localhost
Ingress Class:    nginx
Default backend:  <default>
Rules:
  Host                             Path  Backends
  ----                             ----  --------
  argocd.idpbuilder.cnoe.io.local
                                   /   argocd-server:https (10.244.1.3:8080)
Annotations:                       argocd.argoproj.io/sync-wave: 1
                                   nginx.ingress.kubernetes.io/force-ssl-redirect: true
                                   nginx.ingress.kubernetes.io/ssl-passthrough: true
Events:
  Type    Reason  Age                    From                      Message
  ----    ------  ----                   ----                      -------
  Normal  Sync    4m32s (x2 over 4m32s)  nginx-ingress-controller  Scheduled for sync

NOTE: I changed the ingress host to use the URL https://argocd.127.0.0.1.nip.io/ which is normally working when ingress is deployed on kind using our bash script - https://github.com/snowdrop/k8s-infra/blob/main/kind/kind.sh#L505-L512 and that fails too !!!

@cmoulliard
Copy link
Contributor Author

cmoulliard commented Oct 12, 2023

To fix the issue it is needed to change the kind host ports to use 80 and 443

  extraPortMappings:
  - containerPort: 80
    hostPort: 80 // 8880 -> 80
    protocol: TCP
  - containerPort: 443
    hostPort: 443 // 8443 -> 443
    protocol: TCP

Then we can access the ingress route url
Screenshot 2023-10-12 at 14 43 12

@greghaynes
Copy link
Contributor

The port needs to be specified in the URL per the docs (Argo: Visit https://argocd.idpbuilder.cnoe.io.local:8443/) - It could be nice to make this configurable though. I was avoiding as a default since its often not available.

@cmoulliard
Copy link
Contributor Author

cmoulliard commented Oct 12, 2023

The port needs to be specified in the URL per the docs (Argo: Visit https://argocd.idpbuilder.cnoe.io.local:8443/)

Note: I agree with you that we should propose an option to define the ports to be used by the ingress controller ;-)

I confirm that it works if I use the port 8443 too

Screenshot 2023-10-12 at 18 23 44

@jessesanford
Copy link
Contributor

I am going to close this as it was just confusion over the use of ports. The docs are correctly referencing the ports. However they do not include the information about how to get DNS working. I have correctly pointed everything back to localtest.me as a suffix which should fix that issue. See: #29

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

No branches or pull requests

3 participants