Skip to content

Commit

Permalink
Introduced .Values.externalServices.
Browse files Browse the repository at this point in the history
Co-authored-by: Ciaran Sweet <[email protected]>
  • Loading branch information
pantierra and ciaransweet committed Oct 29, 2024
1 parent 6a90664 commit 4dfd7d2
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 184 deletions.
7 changes: 2 additions & 5 deletions helm-chart/eoapi/templates/services/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- range $serviceName, $v := .Values -}}
{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }}
{{- range $serviceName, $v := .Values.externalServices -}}
{{- if index $v "enabled" }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -12,7 +11,5 @@ data:
---
{{/* END: if index $v "enabled" */}}
{{- end }}
{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}}
{{- end }}
{{/* END: range $serviceName, $v := .Values*/}}
{{/* END: range $serviceName, $v := .Values.externalServices */}}
{{- end }}
7 changes: 2 additions & 5 deletions helm-chart/eoapi/templates/services/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{ include "eoapi.validateTempDB" . }}
{{- range $serviceName, $v := .Values -}}
{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }}
{{- range $serviceName, $v := .Values.externalServices -}}
{{- if index $v "enabled" }}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -68,7 +67,5 @@ spec:
---
{{/* END: if index $v "enabled" */}}
{{- end }}
{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}}
{{- end }}
{{/* END: range $serviceName, $v := .Values*/}}
{{/* END: range $serviceName, $v := .Values.externalServices */}}
{{- end }}
5 changes: 1 addition & 4 deletions helm-chart/eoapi/templates/services/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- include "eoapi.validateAutoscaleRules" . -}}
{{- range $serviceName, $v := .Values -}}
{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }}
{{- range $serviceName, $v := .Values.externalServices -}}
{{- if index $v "autoscaling" "enabled" }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
Expand Down Expand Up @@ -44,7 +43,5 @@ spec:
---
{{/* END: if index $v "autoscaling" "enabled" */}}
{{- end }}
{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}}
{{- end }}
{{/* END: range $serviceName, $v := .Values*/}}
{{- end }}
6 changes: 2 additions & 4 deletions helm-chart/eoapi/templates/services/ingress-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ spec:
rules:
- http:
paths:
{{- range $serviceName, $v := .Values }}
{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }}
{{- range $serviceName, $v := .Values.externalServices }}
{{- if (and (index $v "enabled") (not $.Values.testing)) }}
- pathType: Prefix
path: "/{{ $serviceName }}(/|$)(.*)"
Expand All @@ -49,8 +48,7 @@ spec:
port:
number: {{ $.Values.service.port }}
{{- end }}{{/* END: if index $v "enabled" */}}
{{- end }}{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}}
{{- end }}{{/* END: range $serviceName, $v := .Values*/}}
{{- end }}{{/* END: range $serviceName, $v := .Values.externalServices */}}
{{- if (and (not $.Values.testing) (.Values.docServer.enabled)) }}
- pathType: Prefix
path: /(/|$)
Expand Down
7 changes: 2 additions & 5 deletions helm-chart/eoapi/templates/services/service.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{{- range $serviceName, $v := .Values -}}
{{- if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) }}
{{- range $serviceName, $v := .Values.externalServices -}}
{{- if index $v "enabled" }}
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -28,7 +27,5 @@ spec:
---
{{/* END: if index $v "enabled" */}}
{{- end }}
{{/* END: if (or (eq $serviceName "raster") (eq $serviceName "stac") (eq $serviceName "vector")) */}}
{{- end }}
{{/* END: range $serviceName, $v := .Values*/}}
{{/* END: range $serviceName, $v := .Values.externalServices */}}
{{- end }}
Loading

0 comments on commit 4dfd7d2

Please sign in to comment.