diff --git a/helm-chart/eoapi/templates/services/nginx-doc-server.yaml b/helm-chart/eoapi/templates/services/nginx-doc-server.yaml index ed626d3..69841b5 100644 --- a/helm-chart/eoapi/templates/services/nginx-doc-server.yaml +++ b/helm-chart/eoapi/templates/services/nginx-doc-server.yaml @@ -16,6 +16,7 @@ data:
  • /raster
  • /vector
  • /stac
  • +
  • /browser
  • diff --git a/helm-chart/eoapi/templates/services/stac-browser.yaml b/helm-chart/eoapi/templates/services/stac-browser.yaml new file mode 100644 index 0000000..35ce4fb --- /dev/null +++ b/helm-chart/eoapi/templates/services/stac-browser.yaml @@ -0,0 +1,59 @@ +{{- if (and (.Values.browser.enabled) (not .Values.testing) (.Values.docServer.enabled))}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: browser-{{ .Release.Name }} +spec: + replicas: {{.Values.browser.replicaCount}} + selector: + matchLabels: + app: browser-{{ .Release.Name }} + template: + metadata: + labels: + app: browser-{{ .Release.Name }} + spec: + containers: + - name: browser + image: {{ .Values.browser.image.name }}:{{ .Values.browser.image.tag }} + ports: + - containerPort: 8080 + env: + - name: SB_catalogUrl + value: "/stac" + - name: SB_prefixPath + value: "/browser" +--- +apiVersion: v1 +kind: Service +metadata: + name: browser-{{ .Release.Name }} +spec: + selector: + app: browser-{{ .Release.Name }} + ports: + - protocol: TCP + port: 8080 + targetPort: 8080 +--- +# We need a separate ingress because browser does not play well with nginx rewrite_path directive +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: stac-browser-ingress +spec: + {{- if (and (.Values.ingress.className) (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion)) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + rules: + - http: + paths: + - pathType: Prefix + path: "/browser" + backend: + service: + name: browser-{{ $.Release.Name }} + port: + number: 8080 + +{{- end }} \ No newline at end of file diff --git a/helm-chart/eoapi/templates/services/traefik-doc-server.yaml b/helm-chart/eoapi/templates/services/traefik-doc-server.yaml index 3ef7816..6d53e32 100644 --- a/helm-chart/eoapi/templates/services/traefik-doc-server.yaml +++ b/helm-chart/eoapi/templates/services/traefik-doc-server.yaml @@ -16,6 +16,7 @@ data:
  • /raster
  • /vector
  • /stac
  • +
  • /browser
  • diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index 97537b3..ac93b14 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -334,5 +334,18 @@ vector: # https://www.uvicorn.org/settings/#production WEB_CONCURRENCY: "5" +###################### +# STAC Browser +###################### +# It is a good idea to deploy stac-browser outside of k8s, since it's SPA with static files. +# Please consider alternatives, such as cloud storage + CDN, for example +browser: + enabled: true + replicaCount: 1 + image: + # we use a custom image that overrides pathPrefix value + name: ghcr.io/alekzvik/stac-browser-prefix + tag: 3.2.0 + docServer: enabled: true diff --git a/ingest.sh b/ingest.sh index 7b5e0fa..ce4a200 100755 --- a/ingest.sh +++ b/ingest.sh @@ -17,7 +17,7 @@ else fi # Define namespaces -NAMESPACES=("default" "eoapi", "data-access") +NAMESPACES=("default" "eoapi" "data-access") EOAPI_POD_RASTER="" FOUND_NAMESPACE=""