Skip to content

Commit b522883

Browse files
committed
Initial repo setup
Signed-off-by: Paul Schultz <[email protected]>
1 parent a2edf7c commit b522883

24 files changed

+23241
-1
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.mdx]
12+
trim_trailing_whitespace = false

.gitattributes

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# source code
2+
*.php eol=lf
3+
*.css eol=lf
4+
*.sass eol=lf
5+
*.scss eol=lf
6+
*.less eol=lf
7+
*.styl eol=lf
8+
*.js eol=lf
9+
*.ts eol=lf
10+
*.jsx eol=lf
11+
*.tsx eol=lf
12+
*.coffee eol=lf
13+
*.json eol=lf
14+
*.htm eol=lf
15+
*.html eol=lf
16+
*.xml eol=lf
17+
*.svg eol=lf
18+
*.txt eol=lf
19+
*.ini eol=lf
20+
*.inc eol=lf
21+
*.pl eol=lf
22+
*.rb eol=lf
23+
*.py eol=lf
24+
*.scm eol=lf
25+
*.sql eol=lf
26+
*.sh eol=lf
27+
*.bat eol=lf
28+
29+
# templates
30+
*.ejs eol=lf
31+
*.hbt eol=lf
32+
*.jade eol=lf
33+
*.haml eol=lf
34+
*.hbs eol=lf
35+
*.dot eol=lf
36+
*.tmpl eol=lf
37+
*.phtml eol=lf
38+
39+
# server config
40+
.htaccess eol=lf
41+
42+
# git config
43+
.gitattributes eol=lf
44+
.gitignore eol=lf
45+
.gitconfig eol=lf
46+
47+
# code analysis config
48+
.jshintrc eol=lf
49+
.jscsrc eol=lf
50+
.jshintignore eol=lf
51+
.csslintrc eol=lf
52+
53+
# misc config
54+
*.yaml eol=lf
55+
*.yml eol=lf
56+
.editorconfig eol=lf
57+
58+
# build config
59+
*.npmignore eol=lf
60+
*.bowerrc eol=lf
61+
62+
# Heroku
63+
Procfile eol=lf
64+
.slugignore eol=lf
65+
66+
# Documentation
67+
*.md eol=lf
68+
LICENSE eol=lf
69+
AUTHORS eol=lf
70+
71+
#
72+
## These files are binary and should be left untouched
73+
#
74+
75+
# (binary is a macro for -eol=lf -diff)
76+
*.png binary
77+
*.jpg binary
78+
*.jpeg binary
79+
*.gif binary
80+
*.ico binary
81+
*.mov binary
82+
*.mp4 binary
83+
*.mp3 binary
84+
*.flv binary
85+
*.fla binary
86+
*.swf binary
87+
*.gz binary
88+
*.zip binary
89+
*.7z binary
90+
*.ttf binary
91+
*.eot binary
92+
*.woff binary
93+
*.pyc binary
94+
*.pdf binary

Dockerfile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Stage 1 - Create yarn install skeleton layer
2+
FROM registry.access.redhat.com/ubi9/nodejs-18:latest AS packages
3+
4+
#WORKDIR /app
5+
COPY package.json yarn.lock ./
6+
7+
COPY packages packages
8+
9+
USER 0
10+
11+
RUN chgrp -R 0 /opt/app-root/src && \
12+
chmod -R g=u /opt/app-root/src
13+
14+
USER 1001
15+
16+
RUN npm install -g yarn && \
17+
fix-permissions ./ && \
18+
find packages -mindepth 2 -maxdepth 2 \! -name "package.json" -exec rm -rf {} \+
19+
20+
# Stage 2 - Install dependencies and build packages
21+
FROM registry.access.redhat.com/ubi9/nodejs-18:latest AS build
22+
23+
COPY --from=packages /opt/app-root/src .
24+
25+
RUN fix-permissions ./ && \
26+
yarn install --frozen-lockfile --network-timeout 600000 && rm -rf "$(yarn cache dir)"
27+
28+
COPY . .
29+
30+
USER 0
31+
32+
RUN chgrp -R 0 /opt/app-root/src && \
33+
chmod -R g=u /opt/app-root/src
34+
35+
USER 1001
36+
37+
RUN yarn tsc
38+
RUN yarn --cwd packages/backend build
39+
40+
# Stage 3 - Build the actual backend image and install production dependencies
41+
FROM registry.access.redhat.com/ubi9/nodejs-18-minimal:latest
42+
43+
USER 0
44+
45+
RUN microdnf install -y gzip && microdnf clean all
46+
47+
USER 1001
48+
49+
# Copy the install dependencies from the build stage and context
50+
COPY --from=build /opt/app-root/src/yarn.lock /opt/app-root/src/package.json /opt/app-root/src/packages/backend/dist/skeleton.tar.gz ./
51+
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
52+
53+
RUN npm install -g yarn && \
54+
yarn install --frozen-lockfile --production --network-timeout 600000 && rm -rf "$(yarn cache dir)"
55+
56+
# Copy the built packages from the build stage
57+
COPY --from=build /opt/app-root/src/packages/backend/dist/bundle.tar.gz .
58+
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
59+
60+
# Copy any other files that we need at runtime
61+
COPY app-config.yaml ./
62+
63+
RUN fix-permissions ./
64+
65+
CMD ["node", "packages/backend", "--config", "app-config.yaml"]

charts/backstage/.helmignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/backstage/Chart.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v2
2+
name: backstage
3+
description: A helm chart for deploying Backstage
4+
version: 0.1.6
5+
appVersion: "v1.7.0"
6+
kubeVersion: ">= 1.19.0-0"
7+
home: https://github.com/janus-idp/helm-backstage
8+
annotations:
9+
charts.openshift.io/name: backstage

charts/backstage/README.md

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# backstage
2+
3+
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![AppVersion: v1.7.0](https://img.shields.io/badge/AppVersion-v1.7.0-informational?style=flat-square)
4+
5+
A helm chart for deploying Backstage
6+
7+
**Homepage:** <https://github.com/janus-idp/helm-backstage>
8+
9+
## Installation
10+
11+
This chart can be installed to an individual namespace by first adding the chart repository, creating a new namespace (or using an existing namespace) and installing the chart by executing the following commands:
12+
13+
```shell
14+
helm repo add janus-idp-backstage https://janus-idp.github.io/helm-backstage
15+
helm create namespace backstage
16+
helm upgrade -i backstage -n backstage janus-idp-backstage/backstage --set backstage.baseUrl=<BASE_URL>
17+
```
18+
19+
The preceding command will create a new namespace called `backstage` and install the chart with a release name of `backstage`. At a minimum, the required parameter `backstage.baseUrl` refers to the URL that should be used to access the Backstage user interface.
20+
21+
## Uninstallation
22+
23+
To remove a previously installed chart, execute the following command:
24+
25+
```shell
26+
helm uninstall <RELEASE>
27+
```
28+
29+
Replace `<RELEASE>` with the name of the Helm release that was used when installing the chart.
30+
31+
## Values
32+
33+
| Key | Type | Default | Description |
34+
|-----|------|---------|-------------|
35+
| additionalConfig | object | `{}` | |
36+
| backstage.baseUrl | string | `""` | |
37+
| backstage.catalog.locations[0].target | string | `"https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-components.yaml"` | |
38+
| backstage.catalog.locations[0].type | string | `"url"` | |
39+
| backstage.catalog.rules[0].allow[0] | string | `"Component"` | |
40+
| backstage.catalog.rules[0].allow[1] | string | `"System"` | |
41+
| backstage.catalog.rules[0].allow[2] | string | `"API"` | |
42+
| backstage.catalog.rules[0].allow[3] | string | `"Resource"` | |
43+
| backstage.catalog.rules[0].allow[4] | string | `"Location"` | |
44+
| backstage.companyname | string | `"Red Hat Backstage Helm Chart"` | |
45+
| fullnameOverride | string | `""` | |
46+
| image.pullPolicy | string | `"Always"` | |
47+
| image.registry | string | `"ghcr.io"` | |
48+
| image.repository | string | `"janus-idp/redhat-backstage-build"` | |
49+
| image.version | string | `"latest"` | |
50+
| imagePullSecrets | list | `[]` | |
51+
| ingress.className | string | `""` | |
52+
| ingress.enabled | bool | `false` | |
53+
| ingress.tls.secretName | string | `""` | |
54+
| name | string | `"backstage"` | |
55+
| nameOverride | string | `""` | |
56+
| postgres.database_host | string | `""` | |
57+
| postgres.database_name | string | `"postgres"` | |
58+
| postgres.database_password | string | `""` | |
59+
| postgres.database_port | int | `5432` | |
60+
| postgres.database_user | string | `"postgres"` | |
61+
| postgres.existingSecret | string | `""` | |
62+
| postgres.external | bool | `false` | |
63+
| postgres.image.pullPolicy | string | `"Always"` | |
64+
| postgres.image.registry | string | `"quay.io"` | |
65+
| postgres.image.repository | string | `"fedora/postgresql-13"` | |
66+
| postgres.image.version | string | `"13"` | |
67+
| postgres.resources.limits.cpu | string | `"400m"` | |
68+
| postgres.resources.limits.memory | string | `"596Mi"` | |
69+
| postgres.resources.requests.cpu | string | `"100m"` | |
70+
| postgres.resources.requests.memory | string | `"128Mi"` | |
71+
| postgres.secretKeys.adminPasswordKey | string | `""` | |
72+
| postgres.serviceAccount.annotations | object | `{}` | |
73+
| postgres.serviceAccount.create | bool | `true` | |
74+
| postgres.serviceAccount.name | string | `""` | |
75+
| postgres.storage.enabled | bool | `true` | |
76+
| postgres.storage.size | string | `"2Gi"` | |
77+
| replicaCount | int | `1` | |
78+
| resources | object | `{}` | |
79+
| route.annotations | object | `{}` | |
80+
| route.enabled | bool | `true` | |
81+
| route.termination | string | `"edge"` | |
82+
| securityContext | object | `{}` | |
83+
| service.port | int | `8080` | |
84+
| service.targetPort | int | `7007` | |
85+
| service.type | string | `"ClusterIP"` | |
86+
| serviceAccount.annotations | object | `{}` | |
87+
| serviceAccount.create | bool | `true` | |
88+
| serviceAccount.name | string | `""` | |

charts/backstage/chart_schema.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: str()
2+
home: str(required=False)
3+
version: str()
4+
appVersion: any(str(), num(), required=False)
5+
description: str(required=False)
6+
keywords: list(str(), required=False)
7+
sources: list(str(), required=False)
8+
maintainers: list(include('maintainer'), required=False)
9+
dependencies: list(include('dependency'), required=False)
10+
icon: str(required=False)
11+
engine: str(required=False)
12+
condition: str(required=False)
13+
tags: str(required=False)
14+
deprecated: bool(required=False)
15+
apiVersion: str()
16+
kubeVersion: str(required=False)
17+
type: str(required=False)
18+
annotations: map(str(), str(), required=False)
19+
---
20+
maintainer:
21+
name: str(required=False)
22+
email: str(required=False)
23+
url: str(required=False)
24+
---
25+
dependency:
26+
name: str()
27+
version: str()
28+
repository: str()
29+
condition: str(required=False)
30+
tags: list(str(), required=False)
31+
enabled: bool(required=False)
32+
import-values: any(list(str()), list(include('import-value')), required=False)
33+
alias: str(required=False)
34+
---
35+
import-value:
36+
child: str()
37+
parent: str()

charts/backstage/ci/ci-values.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
backstage:
3+
baseUrl: http://backstage.localhost
4+
route:
5+
enabled: false
6+
ingress:
7+
enabled: true

charts/backstage/templates/NOTES.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Deployment of Backstage Complete!
2+
3+
Access the frontend: {{ .Values.backstage.baseUrl }}

0 commit comments

Comments
 (0)