Skip to content

Commit 7fcc524

Browse files
Add OnBoarding portal (#443)
* feat(chart): add onboarding-portal chart * Update helm documentation * Update helm documentation --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b697a2d commit 7fcc524

File tree

11 files changed

+644
-1
lines changed

11 files changed

+644
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: v2
2+
name: onboarding-portal
3+
version: 1.2.0
4+
appVersion: 0.0.1
5+
type: application
6+
description: A Helm chart for the OnBoarding Portal
7+
icon: https://fiware.github.io/catalogue/img/fiware.png
8+
maintainers:
9+
- name: "Miguel Ortega"
10+
email: "miguel.ortega@seamware.com"
11+
keywords:
12+
- onboarding
13+
- FIWARE
14+
- Data Space Connector

charts/onboarding-portal/README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# onboarding-portal
2+
3+
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.0.1](https://img.shields.io/badge/AppVersion-0.0.1-informational?style=flat-square)
4+
5+
A Helm chart for the OnBoarding Portal
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| Miguel Ortega | <miguel.ortega@seamware.com> | |
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|-----|------|---------|-------------|
17+
| affinity | object | `{}` | Affinity rules for pod scheduling |
18+
| config | object | `{"app":{"documentToSignUrl":"","keycloak":{"auth":{"clientId":"admin-cli","grantType":"password","password":"${APP_KEYCLOAK_PASSWORD}","username":"${APP_KEYCLOAK_USERNAME}"},"baseUrl":""},"login":{"clientId":"${APP_CLIENT_ID}","clientSecret":"${APP_CLIENT_SECRET}","codeChallenge":true,"openIdUrl":"","scope":"openid"},"tir":{"url":""}},"database":{"database":"","host":"","logging":false,"password":"${APP_DB_PASSWORD}","port":5432,"synchronize":true,"type":"postgres","username":"${APP_DB_USERNAME}"},"email":{"enabled":false,"type":"nodemailer"},"logging":{"level":"info"},"server":{"cors":{"allowedHeaders":["Content-Type","Authorization","X-Organization"],"credentials":true,"maxAge":600,"methods":["GET","POST","PUT","DELETE","OPTIONS"],"optionsSuccessStatus":204,"origin":"*"},"port":8080,"storage":{"destFolder":"files","maxSizeMB":5}}}` | Internal application configuration |
19+
| config.app.documentToSignUrl | string | `""` | URL that contains the pdf to be signed |
20+
| config.app.keycloak.auth | object | `{"clientId":"admin-cli","grantType":"password","password":"${APP_KEYCLOAK_PASSWORD}","username":"${APP_KEYCLOAK_USERNAME}"}` | Authentication information needed to create new realms |
21+
| config.app.keycloak.baseUrl | string | `""` | URL of the keycloak where new realms will be created |
22+
| config.app.login.clientId | string | `"${APP_CLIENT_ID}"` | ClientId of the OpenID server |
23+
| config.app.login.clientSecret | string | `"${APP_CLIENT_SECRET}"` | ClientSecret of the OpenID server |
24+
| config.app.login.codeChallenge | bool | `true` | Type of codeChallenge |
25+
| config.app.login.openIdUrl | string | `""` | URL of the OpenID server (e.g: keycloak) |
26+
| config.app.login.scope | string | `"openid"` | Scopes required in the openid request |
27+
| config.app.tir | object | `{"url":""}` | Trust Issuer Register where DID's will be registered |
28+
| config.database | object | `{"database":"","host":"","logging":false,"password":"${APP_DB_PASSWORD}","port":5432,"synchronize":true,"type":"postgres","username":"${APP_DB_USERNAME}"}` | Database configuration. See [TypeORM documentation](https://typeorm.io/docs/data-source/data-source-options) |
29+
| config.email | object | `{"enabled":false,"type":"nodemailer"}` | Email configuration using [Nodemailer](https://nodemailer.com/) |
30+
| config.server.cors | object | `{"allowedHeaders":["Content-Type","Authorization","X-Organization"],"credentials":true,"maxAge":600,"methods":["GET","POST","PUT","DELETE","OPTIONS"],"optionsSuccessStatus":204,"origin":"*"}` | CORS configuration |
31+
| config.server.port | int | `8080` | Server running port |
32+
| config.server.storage.destFolder | string | `"files"` | Local folder to store pdf |
33+
| config.server.storage.maxSizeMB | int | `5` | Max pdf file size |
34+
| extraEnvVars | list | `[]` | Extra environment variables to pass to the container |
35+
| fullnameOverride | string | `""` | String to fully override the chart name |
36+
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
37+
| image.repository | string | `"quay.io/seamware/onboarding"` | Repository for the application image |
38+
| image.tag | string | `""` | Overrides the image tag (defaults to appVersion in Chart.yaml) |
39+
| imagePullSecrets | list | `[]` | Image pull secrets for private repositories |
40+
| ingress.annotations | object | `{"nginx.ingress.kubernetes.io/proxy-body-size":"8m","nginx.ingress.kubernetes.io/proxy-buffer-size":"16k"}` | Ingress annotations |
41+
| ingress.className | string | `""` | Ingress class name |
42+
| ingress.enabled | bool | `false` | Enable ingress resource |
43+
| ingress.hosts | list | `[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | Ingress host configuration |
44+
| ingress.tls | list | `[]` | Ingress TLS configuration |
45+
| livenessProbe | object | `{"httpGet":{"path":"/health/live","port":"http"}}` | Liveness probe configuration |
46+
| nameOverride | string | `""` | String to partially override the chart name |
47+
| nodeSelector | object | `{}` | Node selector for pod scheduling |
48+
| persistence.accessModes | list | `["ReadWriteOnce"]` | Access modes for the PVC |
49+
| persistence.annotations | object | `{}` | Annotations for the PVC |
50+
| persistence.create | bool | `false` | Create a new PVC |
51+
| persistence.enabled | bool | `false` | Enable persistence using PVC |
52+
| persistence.existingClaim | string | `""` | Existing PVC to use |
53+
| persistence.size | string | `"1Gi"` | Size of the PVC |
54+
| persistence.storageClass | string | `""` | Storage class for the PVC |
55+
| podAnnotations | object | `{}` | Annotations to add to the pod |
56+
| podLabels | object | `{}` | Labels to add to the pod |
57+
| podSecurityContext | object | `{}` | Pod-level security context |
58+
| readinessProbe | object | `{"httpGet":{"path":"/health/ready","port":"http"}}` | Readiness probe configuration |
59+
| replicaCount | int | `1` | Number of replicas for the deployment |
60+
| resources | object | `{}` | Resource limits and requests for the pod |
61+
| secrets | object | `{"database":{"passwordKey":"","secretName":"","usernameKey":""},"keycloak":{"passwordKey":"","secretName":"","usernameKey":""},"login":{"clientIdKey":"","clientSecretKey":"","secretName":""}}` | External secrets mapping configuration |
62+
| secrets.database | object | `{"passwordKey":"","secretName":"","usernameKey":""}` | Database secrets |
63+
| secrets.keycloak | object | `{"passwordKey":"","secretName":"","usernameKey":""}` | Onboarding keycloak secrets |
64+
| secrets.login | object | `{"clientIdKey":"","clientSecretKey":"","secretName":""}` | Admin login secrets |
65+
| securityContext | object | `{}` | Container-level security context |
66+
| service.port | int | `80` | Service port |
67+
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
68+
| tolerations | list | `[]` | Tolerations for pod scheduling |
69+
| volumeMounts | list | `[]` | Additional volume mounts |
70+
| volumes | list | `[]` | Additional volumes to mount |
71+
72+
----------------------------------------------
73+
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "onboarding.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "onboarding.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "onboarding.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "onboarding.labels" -}}
37+
helm.sh/chart: {{ include "onboarding.chart" . }}
38+
{{ include "onboarding.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "onboarding.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "onboarding.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ include "onboarding.fullname" . }}-cm
5+
labels:
6+
{{- include "onboarding.labels" . | nindent 4 }}
7+
data:
8+
application.yaml: |-
9+
{{- .Values.config | toYaml | nindent 4 }}
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "onboarding.fullname" . }}
5+
labels:
6+
{{- include "onboarding.labels" . | nindent 4 }}
7+
spec:
8+
replicas: {{ .Values.replicaCount }}
9+
selector:
10+
matchLabels:
11+
{{- include "onboarding.selectorLabels" . | nindent 6 }}
12+
template:
13+
metadata:
14+
annotations:
15+
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
16+
{{- with .Values.podAnnotations }}
17+
{{- toYaml . | nindent 8 }}
18+
{{- end }}
19+
labels:
20+
{{- include "onboarding.labels" . | nindent 8 }}
21+
{{- with .Values.podLabels }}
22+
{{- toYaml . | nindent 8 }}
23+
{{- end }}
24+
spec:
25+
{{- with .Values.imagePullSecrets }}
26+
imagePullSecrets:
27+
{{- toYaml . | nindent 8 }}
28+
{{- end }}
29+
{{- with .Values.podSecurityContext }}
30+
securityContext:
31+
{{- toYaml . | nindent 8 }}
32+
{{- end }}
33+
containers:
34+
- name: {{ .Chart.Name }}
35+
{{- with .Values.securityContext }}
36+
securityContext:
37+
{{- toYaml . | nindent 12 }}
38+
{{- end }}
39+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
40+
imagePullPolicy: {{ .Values.image.pullPolicy }}
41+
ports:
42+
- name: http
43+
containerPort: {{ .Values.config.server.port }}
44+
protocol: TCP
45+
{{- with .Values.livenessProbe }}
46+
livenessProbe:
47+
{{- toYaml . | nindent 12 }}
48+
{{- end }}
49+
{{- with .Values.readinessProbe }}
50+
readinessProbe:
51+
{{- toYaml . | nindent 12 }}
52+
{{- end }}
53+
{{- with .Values.resources }}
54+
resources:
55+
{{- toYaml . | nindent 12 }}
56+
{{- end }}
57+
volumeMounts:
58+
- name: app-config-volume
59+
mountPath: /app/config
60+
readOnly: true
61+
- name: data
62+
mountPath: /app/files
63+
env:
64+
{{- if .Values.secrets.database.secretName }}
65+
{{- if .Values.secrets.database.usernameKey }}
66+
- name: APP_DB_USERNAME
67+
valueFrom:
68+
secretKeyRef:
69+
name: {{ .Values.secrets.database.secretName }}
70+
key: {{ .Values.secrets.database.usernameKey }}
71+
{{- end }}
72+
{{- if .Values.secrets.database.passwordKey }}
73+
- name: APP_DB_PASSWORD
74+
valueFrom:
75+
secretKeyRef:
76+
name: {{ .Values.secrets.database.secretName }}
77+
key: {{ .Values.secrets.database.passwordKey }}
78+
{{- end }}
79+
{{- end }}
80+
{{- if .Values.secrets.login.secretName }}
81+
{{- if .Values.secrets.login.clientIdKey }}
82+
- name: APP_CLIENT_ID
83+
valueFrom:
84+
secretKeyRef:
85+
name: {{ .Values.secrets.login.secretName }}
86+
key: {{ .Values.secrets.login.clientIdKey }}
87+
{{- end }}
88+
{{- if .Values.secrets.login.clientSecretKey }}
89+
- name: APP_CLIENT_SECRET
90+
valueFrom:
91+
secretKeyRef:
92+
name: {{ .Values.secrets.login.secretName }}
93+
key: {{ .Values.secrets.login.clientSecretKey }}
94+
{{- end }}
95+
{{- end }}
96+
{{- if .Values.secrets.keycloak.secretName }}
97+
{{- if .Values.secrets.keycloak.usernameKey }}
98+
- name: APP_KEYCLOAK_USERNAME
99+
valueFrom:
100+
secretKeyRef:
101+
name: {{ .Values.secrets.keycloak.secretName }}
102+
key: {{ .Values.secrets.keycloak.usernameKey }}
103+
{{- end }}
104+
{{- if .Values.secrets.keycloak.passwordKey }}
105+
- name: APP_KEYCLOAK_PASSWORD
106+
valueFrom:
107+
secretKeyRef:
108+
name: {{ .Values.secrets.keycloak.secretName }}
109+
key: {{ .Values.secrets.keycloak.passwordKey }}
110+
{{- end }}
111+
{{- end }}
112+
{{- with .Values.extraEnvVars }}
113+
{{- toYaml . | nindent 12 }}
114+
{{- end }}
115+
volumes:
116+
- name: app-config-volume
117+
configMap:
118+
name: {{ include "onboarding.fullname" . }}-cm
119+
defaultMode: 0644
120+
{{- if and .Values.persistence.enabled }}
121+
{{- if .Values.persistence.existingClaim }}
122+
- name: data
123+
persistentVolumeClaim:
124+
claimName: {{ .Values.persistence.existingClaim }}
125+
{{- else if .Values.persistence.create }}
126+
- name: data
127+
persistentVolumeClaim:
128+
claimName: {{ include "onboarding.fullname" . }}-pvc
129+
{{- end }}
130+
{{- else }}
131+
- name: data
132+
emptyDir: {}
133+
{{- end }}
134+
{{- with .Values.nodeSelector }}
135+
nodeSelector:
136+
{{- toYaml . | nindent 8 }}
137+
{{- end }}
138+
{{- with .Values.affinity }}
139+
affinity:
140+
{{- toYaml . | nindent 8 }}
141+
{{- end }}
142+
{{- with .Values.tolerations }}
143+
tolerations:
144+
{{- toYaml . | nindent 8 }}
145+
{{- end }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
name: {{ include "onboarding.fullname" . }}
6+
labels:
7+
{{- include "onboarding.labels" . | nindent 4 }}
8+
{{- with .Values.ingress.annotations }}
9+
annotations:
10+
{{- toYaml . | nindent 4 }}
11+
{{- end }}
12+
spec:
13+
{{- with .Values.ingress.className }}
14+
ingressClassName: {{ . }}
15+
{{- end }}
16+
{{- if .Values.ingress.tls }}
17+
tls:
18+
{{- range .Values.ingress.tls }}
19+
- hosts:
20+
{{- range .hosts }}
21+
- {{ . | quote }}
22+
{{- end }}
23+
secretName: {{ .secretName }}
24+
{{- end }}
25+
{{- end }}
26+
rules:
27+
{{- range .Values.ingress.hosts }}
28+
- host: {{ .host | quote }}
29+
http:
30+
paths:
31+
{{- range .paths }}
32+
- path: {{ .path }}
33+
{{- with .pathType }}
34+
pathType: {{ . }}
35+
{{- end }}
36+
backend:
37+
service:
38+
name: {{ include "onboarding.fullname" $ }}
39+
port:
40+
number: {{ $.Values.service.port }}
41+
{{- end }}
42+
{{- end }}
43+
{{- end }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{- if and .Values.persistence.enabled .Values.persistence.create }}
2+
apiVersion: v1
3+
kind: PersistentVolumeClaim
4+
metadata:
5+
name: {{ include "onboarding.fullname" . }}-pvc
6+
labels:
7+
{{- include "onboarding.labels" . | nindent 4 }}
8+
{{- if .Values.persistence.annotations }}
9+
annotations:
10+
{{- .Values.persistence.annotations | toYaml | indent 4 }}
11+
{{- end }}
12+
spec:
13+
accessModes: {{ .Values.persistence.accessModes }}
14+
resources:
15+
requests:
16+
storage: {{ .Values.persistence.size }}
17+
storageClassName: {{ .Values.persistence.storageClass | quote }}
18+
{{- end }}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: {{ include "onboarding.fullname" . }}
5+
labels:
6+
{{- include "onboarding.labels" . | nindent 4 }}
7+
spec:
8+
type: {{ .Values.service.type }}
9+
ports:
10+
- port: {{ .Values.service.port }}
11+
targetPort: http
12+
protocol: TCP
13+
name: http
14+
selector:
15+
{{- include "onboarding.selectorLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)