Skip to content

Commit 557a88e

Browse files
committed
feat: templateing of urls in radar-home
1 parent 31b1d86 commit 557a88e

File tree

5 files changed

+24
-18
lines changed

5 files changed

+24
-18
lines changed

charts/radar-home/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "0.1.4"
33
description: RADAR-base home page.
44
name: radar-home
5-
version: 0.5.0
5+
version: 0.6.0
66
icon: "http://radar-base.org/wp-content/uploads/2022/09/Logo_RADAR-Base-RGB.png"
77
sources:
88
- https://github.com/RADAR-base/radar-helm-charts/tree/main/charts/radar-home

charts/radar-home/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# radar-home
44
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/radar-home)](https://artifacthub.io/packages/helm/radar-base/radar-home)
55

6-
![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square)
6+
![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square)
77

88
RADAR-base home page.
99

@@ -48,12 +48,14 @@ RADAR-base home page.
4848
| service.type | string | `"ClusterIP"` | Kubernetes Service type |
4949
| service.port | int | `8080` | Port |
5050
| disable_tls | bool | `false` | Reconfigure Ingress to not force TLS |
51+
| server_name | string | `"localhost"` | Hostname for the home service |
52+
| advertised_protocol | string | `"https"` | The protocol in advertised URIs (https, http) |
5153
| ingress.enabled | bool | `true` | Enable ingress controller resource |
5254
| ingress.annotations | object | check values.yaml | Annotations that define default ingress class, certificate issuer |
5355
| ingress.path | string | `"/"` | Path within the url structure |
5456
| ingress.pathType | string | `"ImplementationSpecific"` | Ingress Path type |
5557
| ingress.ingressClassName | string | `"nginx"` | IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+) |
56-
| ingress.hosts | list | `["localhost"]` | Hosts to accept requests from |
58+
| ingress.hosts | list | `["{{ .Values.server_name | quote }}"]` | Hosts to accept requests from |
5759
| ingress.tls.secretName | string | `"radar-base-tls"` | TLS Secret Name |
5860
| resources.limits | object | `{"cpu":"200m"}` | CPU/Memory resource limits |
5961
| resources.requests | object | `{"cpu":"10m","memory":"5Mi"}` | CPU/Memory resource requests |
@@ -84,13 +86,13 @@ RADAR-base home page.
8486
| startupProbe.failureThreshold | int | `30` | Failure threshold for startupProbe |
8587
| networkpolicy | object | check `values.yaml` | Network policy defines who can access this application and who this applications has access to |
8688
| s3.enabled | bool | `false` | Enable link to S3 |
87-
| s3.url | string | `nil` | URL to S3 |
89+
| s3.url | string | `"{{ .Values.advertised_protocol }}://s3.{{ .Values.server_name }}/login"` | URL to S3 |
8890
| dashboard.enabled | bool | `false` | Enable link to dashboard |
89-
| dashboard.url | string | `nil` | URL to dashboard |
91+
| dashboard.url | string | `"{{ .Values.advertised_protocol }}://dashboard.{{ .Values.server_name }}"` | URL to dashboard |
9092
| appConfig.enabled | bool | `false` | Enable link to app-config service |
9193
| uploadPortal.enabled | bool | `false` | Enable link to upload portal |
9294
| restAuthorizer.enabled | bool | `false` | Enable link to rest source authorizer |
9395
| monitoring.enabled | bool | `false` | Enable link to the monitoring stack, usually Prometheus |
94-
| monitoring.url | string | `nil` | URL to the monitoring stack, usually Prometheus |
96+
| monitoring.url | string | `"{{ .Values.advertised_protocol }}://grafana.{{ .Values.server_name }}/login"` | URL to the monitoring stack, usually Prometheus |
9597
| logging.enabled | bool | `false` | Enable link to the logging stack, usually Graylog |
96-
| logging.url | string | `nil` | URL to the monitoring stack, usually Graylog |
98+
| logging.url | string | `"{{ .Values.advertised_protocol }}://graylog.{{ .Values.server_name }}"` | URL to the monitoring stack, usually Graylog |

charts/radar-home/templates/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ spec:
5151
- name: S3_ENABLED
5252
value: "true"
5353
- name: S3_URL
54-
value: {{ .Values.s3.url | quote }}
54+
value: {{ tpl .Values.s3.url . | quote }}
5555
{{- end }}
5656
{{- if .Values.restAuthorizer.enabled }}
5757
- name: REST_AUTHORIZER_ENABLED
@@ -61,7 +61,7 @@ spec:
6161
- name: DASHBOARD_ENABLED
6262
value: "true"
6363
- name: DASHBOARD_URL
64-
value: {{ .Values.dashboard.url | quote }}
64+
value: {{ tpl .Values.dashboard.url . | quote }}
6565
{{- end }}
6666
{{- if .Values.uploadPortal.enabled }}
6767
- name: UPLOAD_PORTAL_ENABLED
@@ -77,15 +77,15 @@ spec:
7777
{{- end }}
7878
{{- if .Values.logging.url }}
7979
- name: GRAYLOG_URL
80-
value: {{ .Values.logging.url | quote }}
80+
value: {{ tpl .Values.logging.url . | quote }}
8181
{{- end }}
8282
{{- if .Values.monitoring.enabled }}
8383
- name: MONITOR_ENABLED
8484
value: "true"
8585
{{- end }}
8686
{{- if .Values.monitoring.url }}
8787
- name: MONITOR_URL
88-
value: {{ .Values.monitoring.url | quote }}
88+
value: {{ tpl .Values.monitoring.url . | quote }}
8989
{{- end }}
9090
{{- with .Values.extraEnvVars }}
9191
{{- toYaml . | nindent 10 }}

charts/radar-home/templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ spec:
2525
tls:
2626
- hosts:
2727
{{- range $hosts }}
28-
- {{ . | quote }}
28+
- {{ tpl . $ | quote }}
2929
{{- end }}
3030
secretName: {{ .Values.ingress.tls.secretName }}
3131
{{- end }}
3232
rules:
3333
{{- range .Values.ingress.hosts }}
34-
- host: {{ . | quote }}
34+
- host: {{ tpl . $ | quote }}
3535
http:
3636
paths:
3737
- path: {{ $path | quote }}

charts/radar-home/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ service:
4141

4242
# -- Reconfigure Ingress to not force TLS
4343
disable_tls: false
44+
# -- Hostname for the home service
45+
server_name: localhost
46+
# -- The protocol in advertised URIs (https, http)
47+
advertised_protocol: https
4448

4549
ingress:
4650
# -- Enable ingress controller resource
@@ -57,7 +61,7 @@ ingress:
5761
ingressClassName: nginx
5862
# -- Hosts to accept requests from
5963
hosts:
60-
- localhost
64+
- '{{ .Values.server_name | quote }}'
6165
tls:
6266
# -- TLS Secret Name
6367
secretName: radar-base-tls
@@ -173,13 +177,13 @@ s3:
173177
# -- Enable link to S3
174178
enabled: false
175179
# -- URL to S3
176-
url:
180+
url: '{{ .Values.advertised_protocol }}://s3.{{ .Values.server_name }}/login'
177181

178182
dashboard:
179183
# -- Enable link to dashboard
180184
enabled: false
181185
# -- URL to dashboard
182-
url:
186+
url: '{{ .Values.advertised_protocol }}://dashboard.{{ .Values.server_name }}'
183187

184188
appConfig:
185189
# -- Enable link to app-config service
@@ -197,10 +201,10 @@ monitoring:
197201
# -- Enable link to the monitoring stack, usually Prometheus
198202
enabled: false
199203
# -- URL to the monitoring stack, usually Prometheus
200-
url:
204+
url: '{{ .Values.advertised_protocol }}://grafana.{{ .Values.server_name }}/login'
201205

202206
logging:
203207
# -- Enable link to the logging stack, usually Graylog
204208
enabled: false
205209
# -- URL to the monitoring stack, usually Graylog
206-
url:
210+
url: '{{ .Values.advertised_protocol }}://graylog.{{ .Values.server_name }}'

0 commit comments

Comments
 (0)