epinio / epinio

Opinionated platform that runs on Kubernetes, that takes you from App to URL in one step.
https://epinio.io
Apache License 2.0
529 stars 56 forks source link

"no Rules found on Ingress" error when pushing app on new install #2741

Open PGimenez opened 9 months ago

PGimenez commented 9 months ago

Describe the bug Trying to push the example-12factor app on a new install on GKE yields this error 2023/12/20 19:18:28 EpinioServer: "msg"="Error" "error"="no Rules found on Ingress"

I can deploy services, for example mysql but I haven't tested if it works.

To Reproduce Steps to reproduce the behavior, e.g.: Install Epinio as

❯ helm install epinio epinio/epinio --namespace epinio --create-namespace \
    --set global.domain=cloud.peregimenez.com --set ingress.ingressClassName=traefik --set global.tlsIssuer=letsencrypt \
    --set global.tlsIssuerEmail=pere@mail.app --set server.traceLevel=255

Push the app with

epinio push -n test -p . --route test.cloud.peregimenez.com/

Expected behavior A clear and concise description of what you expected to happen.

Logs From the cli:

❯ epinio push -n test -p . --route test.cloud.peregimenez.com/
2023/12/21 00:01:01 Settings-0x140002ac1e0: "level"=4 "msg"="Loading" "from"="/Users/pere/Library/Application Support/epinio/settings.yaml"
2023/12/21 00:01:01 Settings-0x140002ac1e0: "level"=4 "msg"="Loaded" "value"="namespace=(workspace), user=(admin), pass=(password), access_token=({   0001-01-01 00:00:00 +0000 UTC}), api=(https://epinio.cloud.peregimenez.com), wss=(wss://epinio.cloud.peregimenez.com), color=(true), appchart=(), @(/Users/pere/Library/Application Support/epinio/settings.yaml)"
2023/12/21 00:01:01 EpinioClient/Init: "level"=4 "msg"="Ingress API" "url"="https://epinio.cloud.peregimenez.com"
2023/12/21 00:01:01 EpinioClient/Init: "level"=4 "msg"="Settings API" "url"="https://epinio.cloud.peregimenez.com"
2023/12/21 00:01:01 EpinioClient/Push: "level"=4 "msg"="start" "Name"="test" "Namespace"="workspace" "Sources"="/Users/pere/example-12factor"

🚢  About to push an application with the given setup
Manifest: <<Defaults>>
Name: test
Source Origin: /Users/pere/example-12factor
AppChart:
Target Namespace: workspace
Routes:
1: test.cloud.peregimenez.com/

⚠️  Hit Enter to continue or Ctrl+C to abort (deployment will continue automatically in 5 seconds)
2023/12/21 00:01:06 EpinioClient/Push: "level"=5 "msg"="validate app name" "Name"="test" "Namespace"="workspace" "Sources"="/Users/pere/example-12factor"

Create the application resource ...
2023/12/21 00:01:06 EpinioApiClient: "level"=5 "msg"="executing request" "method"="POST" "url"="https://epinio.cloud.peregimenez.com/api/v1/namespaces/workspace/applications" "body"="{\"name\":\"test\",\"configuration\":{\"instances\":null,\"configurations\":null,\"environment\":null,\"routes\":[\"test.cloud.peregimenez.com/\"]}}" "header"={"Authorization":["Basic YWRtaW46cGFzc3dvcmQ="]}
2023/12/21 00:01:07 EpinioApiClient: "level"=5 "msg"="response is not StatusOK: no Rules found on Ingress" "body"="{\"errors\":[{\"status\":500,\"title\":\"no Rules found on Ingress\",\"details\":\"\\nServer Backtrace: no Rules found on Ingress\"},{\"status\":500,\"title\":\"no Rules found on Ingress\",\"details\":\"\\nServer Backtrace: no Rules found on Ingress\"}]}"
2023/12/21 00:01:07 EpinioClient/Push: "level"=4 "msg"="return" "Name"="test" "Namespace"="workspace" "Sources"="/Users/pere/example-12factor"

❌  error pushing app to server: no Rules found on Ingress

From the server:

 2023/12/20 23:01:07 EpinioServer: "msg"="ERROR" "error"="no Rules found on Ingress" "requestId"="d93007d6-17be-4f25-a688-45c694d94443" "origin │
│ "="/api/v1/namespaces/workspace/applications" "error"="no Rules found on Ingress"                                                              │
│ 2023/12/20 23:01:07 EpinioServer: "msg"="ERROR" "error"="no Rules found on Ingress" "requestId"="d93007d6-17be-4f25-a688-45c694d94443" "origin │
│ "="/api/v1/namespaces/workspace/applications" "error"="no Rules found on Ingress"                                                              │
│ 2023/12/20 23:01:07 EpinioServer: "msg"="Error" "error"="no Rules found on Ingress"                                                            │
│ 2023/12/20 23:01:07 EpinioServer: "msg"="Error" "error"="no Rules found on Ingress"  

Cluster (please complete the following information):

riqueps commented 9 months ago

Try to remove the / from your route. it should be: epinio push -n test -p . --route test.cloud.peregimenez.com

riqueps commented 9 months ago

can you send epinio ingress manifest?

PGimenez commented 3 months ago

Six months later, I tried Epinio again and was able to make it work on my Raspberry Pi cluster. However, I tried to move to GKE and I'm running into the same issue again

CleanShot 2024-06-12 at 11 07 28

I'm using Traefik with these values for its helm chart:

ingressClass:
  enabled: true
  isDefaultClass: true
additionalArguments:
  - "--providers.kubernetesingress.ingressclass=traefik"
  - "--ping"
providers:
  kubernetesCRD:
    enabled: true
service:
  enabled: true
  type: LoadBalancer
  spec:
    loadBalancerIP: "0.0.0.0"
log:
  level: DEBUG

And I've installed Epinio with this

❯ helm upgrade epinio epinio/epinio --namespace epinio --create-namespace \
    --set global.domain=domain.com

I'm getting the no rules error from the server:

 Epinio version: v1.11.0                                                                                                                                            │
│                                                                                                                                                                    │
│ listening on localhost on port 8030                                                                                                                                │
│ 2024/06/12 09:04:41 EpinioServer: "msg"="ERROR" "error"="no Rules found on Ingress" "requestId"="6f2b5042-63b3-4e8d-a78a-15ca1b5eaab4" "origin"="/api/v1/namespace │
│ s/workspace/applications" "error"="no Rules found on Ingress"

and apparently Epinio is able to create new ingresses

❯ k get ingress -n epinio
NAME     CLASS     HOSTS                ADDRESS   PORTS     AGE
dex      traefik   auth.domain.io               80, 443   69m
epinio   traefik   epinio.domain.io             80, 443   69m

What am I doing wrong? I've also tried other options in Epinio's helm chart like ingress.ingressClassName="traefik" and I can access the UI but still can't deploy due to the same error