Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
feat: backstage manifests using single namespace
Browse files Browse the repository at this point in the history
Instead of using backstage in other namespace, just don't use, this will
allow  to deploy multiple instances in different namespaces:

Like:
```
kubectl kustomize hack/manifests/backstage/ | kubectl apply -n differentOne -f -
```

Or in default:

```
kubectl kustomize hack/manifests/backstage/ | kubectl apply -n default -f -
```

Fix FLPATH-511

Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
  • Loading branch information
eloycoto authored and openshift-merge-robot committed Jul 4, 2023
1 parent 1e9ebeb commit 9ba3518
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 95 deletions.
8 changes: 4 additions & 4 deletions hack/manifests/backstage/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ backend:
connection:
host: ${POSTGRES_SERVICE_HOST}
port: 5432
user: admin
password: admin
user: parodos
password: parodos
cache:
store: memory
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
Expand All @@ -59,7 +59,7 @@ proxy:
# target: 'https://example.com'
# changeOrigin: true
'/parodos':
target: 'http://workflow-service.default.svc.cluster.local:8080/api/v1'
target: 'http://workflow-service:8080/api/v1'
changeOrigin: true
redirect: follow
cache: 'no-cache'
Expand All @@ -69,7 +69,7 @@ proxy:
Authorization: 'Basic dGVzdDp0ZXN0'

'/parodos-notifications':
target: 'http://notification-service.default.svc.cluster.local:8080/api/v1'
target: 'http://notification-service:8080/api/v1'
changeOrigin: true
redirect: follow
cache: 'no-cache'
Expand Down
2 changes: 0 additions & 2 deletions hack/manifests/backstage/backstage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: backstage
namespace: backstage
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -46,7 +45,6 @@ apiVersion: v1
kind: Service
metadata:
name: backstage
namespace: backstage
spec:
selector:
app: backstage
Expand Down
11 changes: 0 additions & 11 deletions hack/manifests/backstage/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ bases:
- ../base

resources:
- namespace.yaml
- postgres.yaml
- postgres-parodos.yaml
- backstage.yaml

Expand All @@ -12,20 +10,11 @@ patchesStrategicMerge:

configMapGenerator:
- name: app-config
namespace: backstage
files:
- app-config.yaml

secretGenerator:
- name: postgres-secrets
namespace: backstage
literals:
- POSTGRES_USER=admin
- POSTGRES_PASSWORD=admin
- PGDATA=/var/lib/postgresql/data/mydata

- name: postgres-secrets-default
namespace: default
literals:
- POSTGRES_USER=parodos
- POSTGRES_PASSWORD=parodos
Expand Down
5 changes: 0 additions & 5 deletions hack/manifests/backstage/namespace.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion hack/manifests/backstage/parodos-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
DATASOURCE_USERNAME: "parodos"
DATASOURCE_PASSWORD: "parodos"
SPRING_PROFILES_ACTIVE: "local"
NOTIFICATION_SERVER_ADDRESS: "notification-service.default.svc.cluster.local"
NOTIFICATION_SERVER_ADDRESS: "notification-service"
---
apiVersion: v1
kind: ConfigMap
Expand Down
5 changes: 1 addition & 4 deletions hack/manifests/backstage/postgres-parodos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
namespace: default
spec:
accessModes:
- ReadWriteOnce
Expand All @@ -15,7 +14,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: default
spec:
replicas: 1
selector:
Expand All @@ -37,7 +35,7 @@ spec:
mountPath: /var/lib/postgresql/data
envFrom:
- secretRef:
name: postgres-secrets-default
name: postgres-secrets
readinessProbe:
exec:
command: ["pg_isready"]
Expand All @@ -57,7 +55,6 @@ apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: default
spec:
selector:
app: postgres
Expand Down
65 changes: 0 additions & 65 deletions hack/manifests/backstage/postgres.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions hack/manifests/base/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: workflow-service-config
namespace: default
data:
SPRING_PROFILES_ACTIVE: "local"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: notification-service-config
namespace: default
data:
SPRING_PROFILES_ACTIVE: "local"
2 changes: 1 addition & 1 deletion hack/manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ spec:
httpGet:
path: /actuator/health
port: 8080
initialDelaySeconds: 25
initialDelaySeconds: 40
timeoutSeconds: 4

0 comments on commit 9ba3518

Please sign in to comment.