Skip to content

Commit

Permalink
backstage works
Browse files Browse the repository at this point in the history
  • Loading branch information
nabuskey committed Jan 26, 2024
1 parent a066df3 commit 4fdbeac
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 41 deletions.
21 changes: 21 additions & 0 deletions examples/ref-implementation/backstage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: backstage
namespace: argocd
labels:
env: dev
spec:
project: default
source:
repoURL: cnoe://backstage/manifests
targetRevision: HEAD
path: "."
destination:
server: "https://kubernetes.default.svc"
namespace: backstage
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
77 changes: 36 additions & 41 deletions examples/ref-implementation/backstage/manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ subjects:
namespace: backstage
---
apiVersion: v1
kind: ConfigMap
metadata:
name: backstage-config
namespace: backstage
data:
app-config.yaml: |
app:
Expand Down Expand Up @@ -101,10 +105,10 @@ data:
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
integrations:
github:
- host: github.com
apps:
- $include: github-integration.yaml
# github:
# - host: github.com
# apps:
# - $include: github-integration.yaml
# - host: github.com
# # This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
# # about setting up the GitHub integration here: https://backstage.io/docs/getting-started/configuration#setting-up-a-github-integration
Expand All @@ -118,7 +122,7 @@ data:
'/argo-workflows/api':
target: ${ARGO_WORKFLOWS_URL}
changeOrigin: true
secure: true
secure: false
headers:
Authorization:
$env: ARGO_WORKFLOWS_AUTH_TOKEN
Expand Down Expand Up @@ -178,11 +182,6 @@ data:
- $include: k8s-config.yaml
argoWorkflows:
baseUrl: ${ARGO_WORKFLOWS_URL}
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/name: backstage
name: backstage-config
---
apiVersion: v1
kind: Secret
Expand Down Expand Up @@ -223,22 +222,6 @@ spec:
selector:
app: postgresql
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: postgresql
name: postgresql
namespace: backstage
spec:
accessModes:
- ReadWriteOnce
capacity: null
resources:
requests:
storage: 1Gi
storageClassName: gp2
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -260,6 +243,11 @@ spec:
- packages/backend
- --config
- config/app-config.yaml
env:
- name: LOG_LEVEL
value: debug
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
envFrom:
- secretRef:
name: backstage-env-vars
Expand All @@ -277,11 +265,6 @@ spec:
- name: backstage-config
projected:
sources:
- secret:
items:
- key: github-integration.yaml
path: github-integration.yaml
name: integrations
- configMap:
items:
- key: app-config.yaml
Expand Down Expand Up @@ -339,14 +322,6 @@ spec:
requests:
cpu: 100m
memory: 300Mi
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: data
subPath: postgress
volumes:
- name: data
persistentVolumeClaim:
claimName: postgresql
---
apiVersion: generators.external-secrets.io/v1alpha1
kind: Password
Expand Down Expand Up @@ -376,9 +351,10 @@ spec:
template:
engineVersion: v2
data:
BACKSTAGE_FRONTEND_URL: https://argocd.cnoe.localtest.me:8443
BACKSTAGE_FRONTEND_URL: https://backstage.cnoe.localtest.me:8443
POSTGRES_HOST: postgresql.backstage.svc.cluster.local
POSTGRES_PORT: '5432'
POSTGRES_DB: backstage
POSTGRES_USER: backstage
POSTGRES_PASSWORD: "{{.POSTGRES_PASSWORD}}"
ARGO_WORKFLOWS_URL: https://argo.cnoe.localtest.me:8443
Expand All @@ -403,4 +379,23 @@ spec:
name: backstage
rewrite:
- transform:
template: "POSTGRES_PASSWORD"
template: "POSTGRES_PASSWORD"
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backstage
namespace: backstage
spec:
ingressClassName: "nginx"
rules:
- host: backstage.cnoe.localtest.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: backstage
port:
name: http

0 comments on commit 4fdbeac

Please sign in to comment.