Skip to content

Commit 164b087

Browse files
Refactor browser service configuration; update image and ingress settings, and simplify conditionals in Helm templates
1 parent 476611e commit 164b087

File tree

10 files changed

+20
-18
lines changed

10 files changed

+20
-18
lines changed

helm-chart/eoapi/templates/services/browser/deployment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if (and (.Values.browser.enabled) (not .Values.testing) (.Values.docServer.enabled))}}
1+
{{- if .Values.browser.enabled }}
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
@@ -21,6 +21,4 @@ spec:
2121
env:
2222
- name: SB_catalogUrl
2323
value: "/stac"
24-
- name: SB_prefixPath
25-
value: "/stac-browser"
2624
{{- end }}

helm-chart/eoapi/templates/services/browser/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if (and (.Values.browser.enabled) (not .Values.testing) (.Values.docServer.enabled))}}
1+
{{- if .Values.browser.enabled }}
22
apiVersion: v1
33
kind: Service
44
metadata:

helm-chart/eoapi/templates/services/doc-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data:
1919
{{- if .Values.multidim.enabled }}
2020
<li><a href="/multidim" target="_blank" rel="noopener noreferrer">/multidim</a></li>
2121
{{- end}}
22-
<li><a href="/stac-browser/" target="_blank" rel="noopener noreferrer">/browser</a></li>
22+
<li><a href="/browser/" target="_blank" rel="noopener noreferrer">/browser</a></li>
2323
</ul>
2424
</body>
2525
</html>

helm-chart/eoapi/templates/services/ingress.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
path: /raster{{ .Values.ingress.pathSuffix }}
3939
backend:
4040
service:
41-
name: raster
41+
name: raster-{{ $.Release.Name }}
4242
port:
4343
number: {{ .Values.service.port }}
4444
{{- end }}
@@ -48,7 +48,7 @@ spec:
4848
path: /stac{{ .Values.ingress.pathSuffix }}
4949
backend:
5050
service:
51-
name: stac
51+
name: stac-{{ $.Release.Name }}
5252
port:
5353
number: {{ .Values.service.port }}
5454
{{- end }}
@@ -58,7 +58,7 @@ spec:
5858
path: /vector{{ .Values.ingress.pathSuffix }}
5959
backend:
6060
service:
61-
name: vector
61+
name: vector-{{ $.Release.Name }}
6262
port:
6363
number: {{ .Values.service.port }}
6464
{{- end }}
@@ -68,14 +68,14 @@ spec:
6868
path: /multidim{{ .Values.ingress.pathSuffix }}
6969
backend:
7070
service:
71-
name: multidim
71+
name: multidim-{{ $.Release.Name }}
7272
port:
7373
number: {{ .Values.service.port }}
7474
{{- end }}
7575

76-
{{- if (and (.Values.browser.enabled) (not .Values.testing) (.Values.docServer.enabled)) }}
76+
{{- if and .Values.browser.enabled (or (not (hasKey .Values.browser "ingress")) .Values.browser.ingress.enabled) }}
7777
# We need a separate path because browser does not play well with nginx rewrite_path directive
78-
- pathType: Prefix
78+
- pathType: {{ .Values.ingress.pathType }}
7979
path: "/browser"
8080
backend:
8181
service:

helm-chart/eoapi/templates/services/multidim/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: multidim
5+
name: multidim-{{ $.Release.Name }}
66
labels:
77
app: multidim-{{ .Release.Name }}
88
spec:

helm-chart/eoapi/templates/services/raster/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: raster
5+
name: raster-{{ $.Release.Name }}
66
labels:
77
app: raster-{{ .Release.Name }}
88
spec:

helm-chart/eoapi/templates/services/stac/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: stac
5+
name: stac-{{ $.Release.Name }}
66
labels:
77
app: stac-{{ .Release.Name }}
88
spec:

helm-chart/eoapi/templates/services/traefik-middleware.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ spec:
1919
{{- if .Values.multidim.enabled }}
2020
- /multidim
2121
{{- end }}
22+
# {{- if .Values.browser.enabled }}
23+
# - /browser
24+
# {{- end }}
2225
{{- end }}

helm-chart/eoapi/templates/services/vector/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: Service
44
metadata:
5-
name: vector
5+
name: vector-{{ $.Release.Name }}
66
labels:
77
app: vector-{{ .Release.Name }}
88
spec:

helm-chart/eoapi/values.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,14 +465,15 @@ vector:
465465
# STAC Browser
466466
######################
467467
# It is a good idea to deploy stac-browser outside of k8s, since it's SPA with static files.
468-
# Please consider alternatives, such as cloud storage + CDN, for example
469468
browser:
470469
enabled: true
471470
replicaCount: 1
472471
image:
473472
# we use a custom image that overrides pathPrefix value
474-
name: ghcr.io/alekzvik/stac-browser-prefix
475-
tag: 3.2.0
473+
name: ghcr.io/radiantearth/stac-browser
474+
tag: 3.3.4
475+
ingress:
476+
enabled: true # Control ingress specifically for browser service
476477

477478
docServer:
478479
enabled: true

0 commit comments

Comments
 (0)