chore(backstage): Added database and secrets for backstage
This commit is contained in:
17
clusters/artemis/apps/backstage/app-project.yaml
Normal file
17
clusters/artemis/apps/backstage/app-project.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: AppProject
|
||||||
|
metadata:
|
||||||
|
name: backstage
|
||||||
|
spec:
|
||||||
|
description: Developer Portal
|
||||||
|
sourceRepos:
|
||||||
|
- '*'
|
||||||
|
sourceNamespaces:
|
||||||
|
- '*'
|
||||||
|
destinations:
|
||||||
|
- namespace: 'backstage'
|
||||||
|
server: '*'
|
||||||
|
clusterResourceWhitelist:
|
||||||
|
- group: '*'
|
||||||
|
kind: '*'
|
||||||
24
clusters/artemis/apps/backstage/application.yaml
Normal file
24
clusters/artemis/apps/backstage/application.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: backstage
|
||||||
|
namespace: backstage
|
||||||
|
labels:
|
||||||
|
platform.dgse.cloud/cluster: artemis
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: backstage
|
||||||
|
source:
|
||||||
|
repoURL: 'https://git.dgse.cloud/DGSE/kubernetes.git'
|
||||||
|
path: manifests/artemis/backstage
|
||||||
|
targetRevision: main
|
||||||
|
destination:
|
||||||
|
namespace: backstage
|
||||||
|
name: in-cluster
|
||||||
|
syncPolicy:
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
7
clusters/artemis/apps/backstage/kustomization.yaml
Normal file
7
clusters/artemis/apps/backstage/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- app-project.yaml
|
||||||
|
- application.yaml
|
||||||
@@ -16,3 +16,4 @@ resources:
|
|||||||
- ntfy
|
- ntfy
|
||||||
- penpot
|
- penpot
|
||||||
- immich
|
- immich
|
||||||
|
- backstage
|
||||||
|
|||||||
23
manifests/artemis/backstage/db-cluster.yaml
Normal file
23
manifests/artemis/backstage/db-cluster.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: backstage-postgres
|
||||||
|
namespace: backstage
|
||||||
|
spec:
|
||||||
|
imageName: ghcr.io/tensorchord/cloudnative-pgvecto.rs:16.5-v0.3.0@sha256:be3f025d79aa1b747817f478e07e71be43236e14d00d8a9eb3914146245035ba
|
||||||
|
instances: 1
|
||||||
|
managed:
|
||||||
|
roles:
|
||||||
|
- name: backstage
|
||||||
|
superuser: true
|
||||||
|
login: true
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: backstage
|
||||||
|
owner: backstage
|
||||||
|
secret:
|
||||||
|
name: backstage-postgres-user
|
||||||
|
|
||||||
|
storage:
|
||||||
|
size: 2Gi
|
||||||
|
storageClass: local-path
|
||||||
9
manifests/artemis/backstage/kustomization.yaml
Normal file
9
manifests/artemis/backstage/kustomization.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
metadata:
|
||||||
|
name: backstage
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- secret.yaml
|
||||||
|
- db-cluster.yaml
|
||||||
33
manifests/artemis/backstage/secret.yaml
Normal file
33
manifests/artemis/backstage/secret.yaml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
apiVersion: external-secrets.io/v1
|
||||||
|
kind: ExternalSecret
|
||||||
|
metadata:
|
||||||
|
name: backstage
|
||||||
|
spec:
|
||||||
|
refreshInterval: 1h
|
||||||
|
secretStoreRef:
|
||||||
|
name: platform
|
||||||
|
kind: ClusterSecretStore
|
||||||
|
target:
|
||||||
|
name: backstage-postgres-user
|
||||||
|
data:
|
||||||
|
- secretKey: DB_USERNAME
|
||||||
|
remoteRef:
|
||||||
|
key: backstage/db
|
||||||
|
property: DB_USERNAME
|
||||||
|
- secretKey: DB_DATABASE_NAME
|
||||||
|
remoteRef:
|
||||||
|
key: backstage/db
|
||||||
|
property: DB_DATABASE_NAME
|
||||||
|
- secretKey: DB_PASSWORD
|
||||||
|
remoteRef:
|
||||||
|
key: backstage/db
|
||||||
|
property: DB_PASSWORD
|
||||||
|
- secretKey: username
|
||||||
|
remoteRef:
|
||||||
|
key: backstage/db
|
||||||
|
property: username
|
||||||
|
- secretKey: password
|
||||||
|
remoteRef:
|
||||||
|
key: backstage/db
|
||||||
|
property: password
|
||||||
Reference in New Issue
Block a user