This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make default operator configuration configurable not hardcoded (#49)
* yaml/configMap default configuration * fix make test * fix with new objects * fix with new objects * config small fixes * fix for #51
- Loading branch information
1 parent
b2b23ea
commit 4ecaa15
Showing
25 changed files
with
595 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: # placeholder for '<cr-name>-auth' | ||
data: | ||
# A random value will be generated for the backend-secret key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl' | ||
spec: | ||
selector: | ||
backstage.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
clusterIP: None | ||
ports: | ||
- port: 5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backstage-psql # placeholder for 'backstage-psql-<cr-name>' .NOTE: For the time it is static and linked to Secret-> postgres-secrets -> OSTGRES_HOST | ||
spec: | ||
selector: | ||
backstage.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
ports: | ||
- port: 5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
spec: | ||
podManagementPolicy: OrderedReady | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
backstage.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
serviceName: backstage-psql-cr1-hl # placeholder for 'backstage-psql-<cr-name>-hl' | ||
template: | ||
metadata: | ||
labels: | ||
backstage.io/app: backstage-psql-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
name: backstage-db-cr1 # placeholder for 'backstage-psql-<cr-name>' | ||
spec: | ||
containers: | ||
- env: | ||
- name: POSTGRESQL_PORT_NUMBER | ||
value: "5432" | ||
- name: POSTGRESQL_VOLUME_DIR | ||
value: /var/lib/pgsql/data | ||
- name: PGDATA | ||
value: /var/lib/pgsql/data/userdata | ||
envFrom: | ||
- secretRef: | ||
name: postgres-secrets | ||
image: quay.io/fedora/postgresql-15:latest | ||
imagePullPolicy: IfNotPresent | ||
securityContext: | ||
runAsNonRoot: true | ||
allowPrivilegeEscalation: false | ||
seccompProfile: | ||
type: RuntimeDefault | ||
capabilities: | ||
drop: | ||
- ALL | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- exec pg_isready -U ${POSTGRES_USER} -h 127.0.0.1 -p 5432 | ||
failureThreshold: 6 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
name: postgresql | ||
ports: | ||
- containerPort: 5432 | ||
name: tcp-postgresql | ||
protocol: TCP | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- -e | ||
- | | ||
exec pg_isready -U ${POSTGRES_USER} -h 127.0.0.1 -p 5432 | ||
failureThreshold: 6 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
resources: | ||
requests: | ||
cpu: 250m | ||
memory: 256Mi | ||
limits: | ||
memory: 1024Mi | ||
volumeMounts: | ||
- mountPath: /dev/shm | ||
name: dshm | ||
- mountPath: /var/lib/pgsql/data | ||
name: data | ||
restartPolicy: Always | ||
securityContext: {} | ||
serviceAccount: default | ||
serviceAccountName: default | ||
volumes: | ||
- emptyDir: | ||
medium: Memory | ||
name: dshm | ||
updateStrategy: | ||
rollingUpdate: | ||
partition: 0 | ||
type: RollingUpdate | ||
volumeClaimTemplates: | ||
- apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: data | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: backstage | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
backstage.io/app: # placeholder for 'backstage-<cr-name>' | ||
template: | ||
metadata: | ||
labels: | ||
backstage.io/app: # placeholder for 'backstage-<cr-name>' | ||
spec: | ||
# serviceAccountName: default | ||
volumes: | ||
- ephemeral: | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
name: dynamic-plugins-root | ||
- name: dynamic-plugins-npmrc | ||
secret: | ||
defaultMode: 420 | ||
optional: true | ||
secretName: dynamic-plugins-npmrc | ||
|
||
initContainers: | ||
- command: | ||
- ./install-dynamic-plugins.sh | ||
- /dynamic-plugins-root | ||
env: | ||
- name: NPM_CONFIG_USERCONFIG | ||
value: /opt/app-root/src/.npmrc.dynamic-plugins | ||
image: 'quay.io/janus-idp/backstage-showcase:next' | ||
imagePullPolicy: IfNotPresent | ||
name: install-dynamic-plugins | ||
volumeMounts: | ||
- mountPath: /dynamic-plugins-root | ||
name: dynamic-plugins-root | ||
- mountPath: /opt/app-root/src/.npmrc.dynamic-plugins | ||
name: dynamic-plugins-npmrc | ||
readOnly: true | ||
subPath: .npmrc | ||
workingDir: /opt/app-root/src | ||
|
||
containers: | ||
- name: backstage-backend | ||
image: quay.io/janus-idp/backstage-showcase:next | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- "--config" | ||
- "dynamic-plugins-root/app-config.dynamic-plugins.yaml" | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthcheck | ||
port: 7007 | ||
scheme: HTTP | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
successThreshold: 2 | ||
timeoutSeconds: 2 | ||
livenessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /healthcheck | ||
port: 7007 | ||
scheme: HTTP | ||
initialDelaySeconds: 60 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 2 | ||
ports: | ||
- name: http | ||
containerPort: 7007 | ||
env: | ||
- name: APP_CONFIG_backend_listen_port | ||
value: "7007" | ||
envFrom: | ||
- secretRef: | ||
name: postgres-secrets | ||
# - secretRef: | ||
# name: backstage-secrets | ||
volumeMounts: | ||
- mountPath: /opt/app-root/src/dynamic-plugins-root | ||
name: dynamic-plugins-root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: # placeholder for '<cr-name>-dynamic-plugins' | ||
data: | ||
"dynamic-plugins.yaml": | | ||
includes: | ||
- dynamic-plugins.default.yaml | ||
plugins: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: backstage | ||
spec: | ||
type: NodePort | ||
selector: | ||
backstage.io/app: # placeholder for 'backstage-<cr-name>' | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.