Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions helm-chart/eoapi-support/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{/*
Fetch the CA Bundle from a specified secret if enabled
*/}}
{{- define "eoapi-support.fetchCaBundle" -}}
{{- if .Values.enableCaBundleFetch -}}
{{- $secretName := .Values.caBundleSecretName | default "eoepca-ca-secret" -}}
{{- $caBundle := "" -}}
{{- with (lookup "v1" "Secret" "default" $secretName) -}}
{{- $caBundle = index .data "ca.crt" | b64dec -}}
{{- end -}}
{{- $caBundle -}}
{{- else -}}
"" # Return an empty string if not enabled
{{- end -}}
{{- end -}}
6 changes: 5 additions & 1 deletion helm-chart/eoapi-support/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# when enabled, metrics-server will use the caBundle from the provided secret
# ref: https://github.com/developmentseed/eoapi-k8s/issues/154
enableCaBundleFetch: false
caBundleSecretName: ""

# most of this was cribbed from https://github.com/2i2c-org/infrastructure/blob/master/helm-charts/support/
# so giving props where props are due to Yuvi Panda :sparkles:
prometheus-adapter:
Expand Down Expand Up @@ -163,7 +168,6 @@ grafana:
dashboardsConfigMaps:
default: "eoapi-dashboards"


metrics-server:
apiService:
create: true
Loading