Skip to content

Commit

Permalink
Merge pull request #96 from RADAR-base/app-vars
Browse files Browse the repository at this point in the history
Allow applications to be configured via environment variables
  • Loading branch information
keyvaann authored Sep 14, 2023
2 parents fad4035 + 788c823 commit ce0c283
Show file tree
Hide file tree
Showing 92 changed files with 326 additions and 135 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[charts/**]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# 2 space indentation
[charts/**.yaml]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion charts/app-config-frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
8 changes: 5 additions & 3 deletions charts/app-config-frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# app-config-frontend
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/app-config-frontend)](https://artifacthub.io/packages/helm/radar-base/app-config-frontend)

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)

A Helm chart for the frontend application of RADAR-base application config (app-config).

Expand Down Expand Up @@ -46,14 +46,16 @@ A Helm chart for the frontend application of RADAR-base application config (app-
| ingress.enabled | bool | `true` | Enable ingress controller resource |
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer |
| ingress.path | string | `"/appconfig"` | Path within the url structure |
| ingress.pathType | string | `"ImplementationSpecific"` | |
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress Path type |
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
| ingress.tls.secretName | string | `"radar-base-tls"` | TLS Secret Name |
| ingress.tls.secretName | string | `"radar-base-tls-appconfig-frontend"` | TLS Secret Name |
| resources.limits | object | `{"cpu":"200m","memory":"512Mi"}` | CPU/Memory resource limits |
| resources.requests | object | `{"cpu":"100m","memory":"128Mi"}` | CPU/Memory resource requests |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| authUrl | string | `"http://localhost/managementportal/oauth"` | Authorization URL of the IDP |
| authCallbackUrl | string | `"http://localhost/appconfig/login"` | Callback URL to where authorization-code should be returned |
| backendUrl | string | `"/appconfig/api"` | Base-URL of the App Config backend service |
4 changes: 4 additions & 0 deletions charts/app-config-frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
value: {{ .Values.authCallbackUrl }}
- name: APP_CONFIG_URL
value: {{ .Values.backendUrl }}
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand All @@ -69,6 +72,7 @@ spec:
port: http
resources:
{{- toYaml .Values.resources | nindent 12 }}

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
1 change: 1 addition & 0 deletions charts/app-config-frontend/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
Expand Down
11 changes: 9 additions & 2 deletions charts/app-config-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,19 @@ ingress:
# -- Annotations that define default ingress class, certificate issuer
# @default -- check values.yaml
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
# -- Path within the url structure
path: /appconfig
# -- Ingress Path type
pathType: ImplementationSpecific
# -- IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
ingressClassName: nginx
# -- Hosts to accept requests from
hosts:
- localhost
tls:
# -- TLS Secret Name
secretName: radar-base-tls
secretName: radar-base-tls-appconfig-frontend

resources:
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -86,6 +88,11 @@ tolerations: []
# -- Affinity labels for pod assignment
affinity: {}

# -- Extra environment variables
extraEnvVars: []
# - name: BEARER_AUTH
# value: true

# -- Authorization URL of the IDP
authUrl: http://localhost/managementportal/oauth
# -- Callback URL to where authorization-code should be returned
Expand Down
2 changes: 1 addition & 1 deletion charts/app-config/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.5.0"
description: A Helm chart for RADAR-base application config (app-config) backend service which is used as mobile app configuration engine with per-project and per-user configuration.
name: app-config
version: 1.0.0
version: 1.0.1
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/app-config
Expand Down
8 changes: 5 additions & 3 deletions charts/app-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# app-config
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/app-config)](https://artifacthub.io/packages/helm/radar-base/app-config)

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
![Version: 1.0.1](https://img.shields.io/badge/Version-1.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)

A Helm chart for RADAR-base application config (app-config) backend service which is used as mobile app configuration engine with per-project and per-user configuration.

Expand Down Expand Up @@ -48,14 +48,16 @@ A Helm chart for RADAR-base application config (app-config) backend service whic
| ingress.enabled | bool | `true` | Enable ingress controller resource |
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer |
| ingress.path | string | `"/appconfig/api"` | Path within the url structure |
| ingress.pathType | string | `"ImplementationSpecific"` | |
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress Path type |
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
| ingress.tls.secretName | string | `"radar-base-tls"` | TLS Secret Name |
| ingress.tls.secretName | string | `"radar-base-tls-appconfig"` | TLS Secret Name |
| resources.limits | object | `{"cpu":2}` | CPU/Memory resource limits |
| resources.requests | object | `{"cpu":"100m","memory":"768Mi"}` | CPU/Memory resource requests |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| javaOpts | string | `"-Xmx550m"` | Standard JAVA_OPTS that should be passed to this service |
| clientId | string | `"radar_appconfig"` | OAuth2 client id |
| clientSecret | string | `"secret"` | OAuth2 client secret |
Expand Down
3 changes: 3 additions & 0 deletions charts/app-config/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
secretKeyRef:
name: {{ template "app-config.secretName" . }}
key: databasePassword
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/radar-app-config/
Expand Down
1 change: 1 addition & 0 deletions charts/app-config/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
Expand Down
11 changes: 9 additions & 2 deletions charts/app-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,19 @@ ingress:
# -- Annotations that define default ingress class, certificate issuer
# @default -- check values.yaml
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
# -- Path within the url structure
path: /appconfig/api
# -- Ingress Path type
pathType: ImplementationSpecific
# -- IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
ingressClassName: nginx
# -- Hosts to accept requests from
hosts:
- localhost
tls:
# -- TLS Secret Name
secretName: radar-base-tls
secretName: radar-base-tls-appconfig

resources:
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -91,6 +93,11 @@ tolerations: []
# -- Affinity labels for pod assignment
affinity: {}

# -- Extra environment variables
extraEnvVars: []
# - name: BEARER_AUTH
# value: true

# -- Standard JAVA_OPTS that should be passed to this service
javaOpts: "-Xmx550m"
# -- OAuth2 client id
Expand Down
2 changes: 1 addition & 1 deletion charts/catalog-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "0.8.2"
description: A Helm chart for RADAR-base catalogue server. This application creates RADAR-base topics in Kafka, registers schemas in Schema Registry and keeps a catalog of available source types.
name: catalog-server
version: 0.4.6
version: 0.4.7
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/catalog-server
Expand Down
3 changes: 2 additions & 1 deletion charts/catalog-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# catalog-server
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/catalog-server)](https://artifacthub.io/packages/helm/radar-base/catalog-server)

![Version: 0.4.6](https://img.shields.io/badge/Version-0.4.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.2](https://img.shields.io/badge/AppVersion-0.8.2-informational?style=flat-square)
![Version: 0.4.7](https://img.shields.io/badge/Version-0.4.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.2](https://img.shields.io/badge/AppVersion-0.8.2-informational?style=flat-square)

A Helm chart for RADAR-base catalogue server. This application creates RADAR-base topics in Kafka, registers schemas in Schema Registry and keeps a catalog of available source types.

Expand Down Expand Up @@ -50,6 +50,7 @@ A Helm chart for RADAR-base catalogue server. This application creates RADAR-bas
| nodeSelector | object | `{}` | Node labels for pod assignment |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVarsInit | list | `[]` | Extra environment variables |
| kafka_num_brokers | int | `3` | number of Kafka brokers to look for |
| kafka | string | `"cp-kafka-headless:9092"` | URI of Kafka brokers |
| schema_registry | string | `"http://cp-schema-registry:8081"` | URL of the confluent schema registry |
Expand Down
3 changes: 3 additions & 0 deletions charts/catalog-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ spec:
name: {{ template "catalog-server.fullname" . }}
key: srApiSecret
{{- end }}
{{- with .Values.extraEnvVarsInit }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/radar-schemas-tools
Expand Down
5 changes: 5 additions & 0 deletions charts/catalog-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ tolerations: []
# -- Affinity labels for pod assignment
affinity: {}

# -- Extra environment variables
extraEnvVarsInit: []
# - name: BEARER_AUTH
# value: true

# -- number of Kafka brokers to look for
kafka_num_brokers: 3
# -- URI of Kafka brokers
Expand Down
2 changes: 1 addition & 1 deletion charts/management-portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2.0.0"
description: A Helm chart for RADAR-Base Management Portal to manage projects and participants throughout RADAR-base.
name: management-portal
version: 1.0.0
version: 1.0.2
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/management-portal
Expand Down
8 changes: 5 additions & 3 deletions charts/management-portal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# management-portal
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/management-portal)](https://artifacthub.io/packages/helm/radar-base/management-portal)

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)
![Version: 1.0.2](https://img.shields.io/badge/Version-1.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)

A Helm chart for RADAR-Base Management Portal to manage projects and participants throughout RADAR-base.

Expand Down Expand Up @@ -45,14 +45,16 @@ A Helm chart for RADAR-Base Management Portal to manage projects and participant
| ingress.enabled | bool | `true` | Enable ingress controller resource |
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer and rate limiter |
| ingress.path | string | `"/managementportal"` | Path within the url structure |
| ingress.pathType | string | `"ImplementationSpecific"` | |
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress Path type |
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
| ingress.tls.secretName | string | `"radar-base-tls"` | TLS Secret Name |
| ingress.tls.secretName | string | `"radar-base-tls-managementportal"` | TLS Secret Name |
| resources.limits | object | `{"cpu":2,"memory":"1700Mi"}` | CPU/Memory resource limits |
| resources.requests | object | `{"cpu":"100m","memory":"512Mi"}` | CPU/Memory resource requests |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| keystore | string | `""` | base 64 encoded binary p12 keystore containing a ECDSA certificate with alias `radarbase-managementportal-ec` and a RSA certificate with alias `selfsigned`. |
| postgres.host | string | `"postgresql"` | host name of the postgres db |
| postgres.port | int | `5432` | post of the postgres db |
Expand Down
3 changes: 3 additions & 0 deletions charts/management-portal/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ spec:
- name: SPRING_MAIL_PROPERTIES_MAIL_SMTP_STARTTLS_ENABLE
value: {{ .Values.smtp.starttls | quote }}
{{ end }}
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 10 }}
{{- end }}
ports:
- name: http
containerPort: 8080
Expand Down
1 change: 1 addition & 0 deletions charts/management-portal/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
Expand Down
13 changes: 10 additions & 3 deletions charts/management-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Number of Management Portal replicas to deploy
# -- Number of Management Portal replicas to deploy
replicaCount: 1

image:
Expand Down Expand Up @@ -46,7 +46,6 @@ ingress:
# -- Annotations that define default ingress class, certificate issuer and rate limiter
# @default -- check values.yaml
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/server-snippet: |
Expand All @@ -59,13 +58,16 @@ ingress:
}
# -- Path within the url structure
path: "/managementportal"
# -- Ingress Path type
pathType: ImplementationSpecific
# -- IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
ingressClassName: nginx
# -- Hosts to accept requests from
hosts:
- localhost
tls:
# -- TLS Secret Name
secretName: radar-base-tls
secretName: radar-base-tls-managementportal

resources:
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -91,6 +93,11 @@ tolerations: []
# -- Affinity labels for pod assignment
affinity: {}

# -- Extra environment variables
extraEnvVars: []
# - name: BEARER_AUTH
# value: true

# -- base 64 encoded binary p12 keystore containing a ECDSA certificate with alias `radarbase-managementportal-ec` and a RSA certificate with alias `selfsigned`.
keystore: ""
# With helmfile, this can be set in a production.yaml.gotmpl
Expand Down
2 changes: 1 addition & 1 deletion charts/radar-appserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2.3.0"
description: A Helm chart for the backend application of RADAR-base Appserver
name: radar-appserver
version: 0.1.7
version: 0.1.8
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
sources:
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/radar-appserver
Expand Down
6 changes: 4 additions & 2 deletions charts/radar-appserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# radar-appserver
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/radar-appserver)](https://artifacthub.io/packages/helm/radar-base/radar-appserver)

![Version: 0.1.7](https://img.shields.io/badge/Version-0.1.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square)
![Version: 0.1.8](https://img.shields.io/badge/Version-0.1.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.3.0](https://img.shields.io/badge/AppVersion-2.3.0-informational?style=flat-square)

A Helm chart for the backend application of RADAR-base Appserver

Expand Down Expand Up @@ -45,12 +45,14 @@ A Helm chart for the backend application of RADAR-base Appserver
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer and session configuration |
| ingress.path | string | `"/appserver/?(.*)"` | Path within the url structure |
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress path type |
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
| ingress.tls.secretName | string | `"radar-base-tls"` | TLS Secret Name |
| ingress.tls.secretName | string | `"radar-base-tls-appserver"` | TLS Secret Name |
| resources.requests | object | `{"cpu":"100m","memory":"128Mi"}` | CPU/Memory resource requests |
| nodeSelector | object | `{}` | Node labels for pod assignment |
| tolerations | list | `[]` | Toleration labels for pod assignment |
| affinity | object | `{}` | Affinity labels for pod assignment |
| extraEnvVars | list | `[]` | Extra environment variables |
| postgres.host | string | `"radar-appserver-postgresql"` | host name of the postgres db |
| postgres.port | int | `5432` | post of the postgres db |
| postgres.database | string | `"appserver"` | database name |
Expand Down
Loading

0 comments on commit ce0c283

Please sign in to comment.