vinzscam / backstage-chart

Backstage Helm Chart
27 stars 10 forks source link

Populate an ingress resource to expose the backend and/or front end service #5

Closed cmoulliard closed 2 years ago

cmoulliard commented 2 years ago

Requirement

Populate an ingress resource to expose the backend and/or front end service. Here is an idea of such a code implementation https://raw.githubusercontent.com/backstage/backstage/master/contrib/chart/backstage/templates/ingress.yaml.

cmoulliard commented 2 years ago

If I create an ingress resource

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: backstage
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
  rules:
    - host: backstage.192.168.1.90.nip.io
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: my-backstage
                port:
                  number: 7007

then I can access the Service but nothing appears within the browser window

Screenshot 2022-06-20 at 15 49 25

Do we have to take care of the warning messages to fix the issue ? Is the issue due to the certificate ?

2022-06-20T13:49:05.326Z backstage info ::ffff:10.244.0.7 - - [20/Jun/2022:13:49:05 +0000] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit
/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36" type=incomingRequest
2022-06-20T13:50:37.211Z catalog warn file /examples/entities.yaml does not exist type=plugin entity=location:default/generated-eeed3503740b7c4b80f2aad3e417fafee7a3803d
2022-06-20T13:50:37.215Z catalog warn file /examples/template/template.yaml does not exist type=plugin entity=location:default/generated-c4d4a3f82d0b7ecef1bd7d6a1991be94fded46aa
2022-06-20T13:50:37.218Z catalog warn file /examples/org.yaml does not exist type=plugin entity=location:default/generated-0ca6551527608b8e42ccccd463f27d4113d35ff1

WDYT ? @vinzscam

cmoulliard commented 2 years ago

If I open one of the resource reported within the console in a separate window and accept to access the TLS resource endpoints then I got another error

Screenshot 2022-06-20 at 16 06 47

vinzscam commented 2 years ago

yeah this is due to a missing configuration in your app-config: right now it requires to have backend.baseUrl set to http://backstage.192.168.1.90.nip.io. Ideally setting this value shouldn't be required in case of backend serving the frontend, but unfortunately it is at the moment.