Skip to content

Commit

Permalink
fixes #22 (#46)
Browse files Browse the repository at this point in the history
* Adding the definition about the Service and Ingress kubernetes resource to expose backstage using the host: backstage.idpbuilder.cnoe.io.local

Signed-off-by: cmoulliard <[email protected]>

* Changing localhost host name to https://backstage.idpbuilder.cnoe.io.local:8443 to avoid the error: backstage/backstage#15403

Signed-off-by: cmoulliard <[email protected]>

* Switching the DNS name from cnoe.io.local to cnoe.io.localtest.me

Signed-off-by: cmoulliard <[email protected]>

---------

Signed-off-by: cmoulliard <[email protected]>
Co-authored-by: cmoulliard <[email protected]>
  • Loading branch information
jessesanford and cmoulliard authored Oct 19, 2023
1 parent 59570de commit eae6d24
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ This can be useful in several ways:

Kubernetes: `kubectl get pods`

Argo: Visit https://argocd.idpbuilder.cnoe.io.localtest.me:8443/
Argo: https://argocd.idpbuilder.cnoe.io.localtest.me:8443/

Backstage: http://backstage.idpbuilder.cnoe.io.localtest.me/
Backstage: https://backstage.idpbuilder.cnoe.io.localtest.me:8443/

## Architecture

Expand Down
44 changes: 40 additions & 4 deletions pkg/apps/srv/backstage/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,49 @@ spec:
image: public.ecr.aws/cnoe-io/backstage:v0.0.3
imagePullPolicy: IfNotPresent
ports:
- name: http
- name: backend
containerPort: 7007
volumeMounts:
- mountPath: /app/config
name: backstage-config
readOnly: true
---
---
apiVersion: v1
kind: Service
metadata:
name: backstage
namespace: backstage
spec:
ports:
- name: http-backend
port: 7007
protocol: TCP
targetPort: backend
selector:
app: backstage
sessionAffinity: None
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backstage
namespace: backstage
spec:
ingressClassName: nginx
rules:
- host: backstage.idpbuilder.cnoe.io.localtest.me
http:
paths:
- backend:
service:
name: backstage
port:
number: 7007
path: /
pathType: Prefix
---
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -116,17 +152,17 @@ data:
app-config.yaml: |
app:
title: CNOE
baseUrl: http://localhost:3000
baseUrl: "https://backstage.idpbuilder.cnoe.io.localtest.me:8443"
organization:
name: CNOE
backend:
baseUrl: http://localhost:7007
baseUrl: "https://backstage.idpbuilder.cnoe.io.localtest.me:8443"
listen:
port: 7007
csp:
connect-src: ["'self'", 'http:', 'https:']
cors:
origin: http://localhost:3000
origin: "https://backstage.idpbuilder.cnoe.io.localtest.me:8443"
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true
database:
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/gitserver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const (
gitServerResourceName string = "gitserver"
gitServerDeploymentContainerName string = "httpd"
gitServerIngressHostnameBase string = ".idpbuilder.cnoe.io.local"
gitServerIngressHostnameBase string = ".idpbuilder.cnoe.io.localtest.me"
repoUrlFmt string = "http://%s.%s.svc/idpbuilder-resources.git"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/localbuild/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
EmbeddedGitServerName string = "embedded"
gitServerResourceName string = "gitserver"
gitServerDeploymentContainerName string = "httpd"
gitServerIngressHostnameBase string = ".idpbuilder.cnoe.io.local"
gitServerIngressHostnameBase string = ".idpbuilder.cnoe.io.localtest.me"
repoUrlFmt string = "http://%s.%s.svc/idpbuilder-resources.git"
)

Expand Down

0 comments on commit eae6d24

Please sign in to comment.