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
9 changes: 9 additions & 0 deletions .changesets/feat_helm_existingsecretkeyrefkey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Provide support to control of the key name used to retrieve the secret used for APOLLO_KEY ([Issue #5661](https://github.com/apollographql/router/issues/5661))

The Router Helm chart currently is hardcoded to use managedFederationApiKey as the key name to use to retrieve the value
out of the referenced secretkey. Some kubernetes customers require the use of a secretStore / externalSecret,
and may be required to use a specific key name when obtaining secrets from these sources.

This change provides the user the ability to control the name of the key to use in retrieving that value.

By [Jon Christiansen](https://github.com/theJC) in https://github.com/apollographql/router/pull/5662
2 changes: 1 addition & 1 deletion helm/chart/router/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
valueFrom:
secretKeyRef:
name: {{ template "router.managedFederation.apiSecretName" . }}
key: managedFederationApiKey
key: {{ (.Values.managedFederation.existingSecretKeyRefKey | default "managedFederationApiKey") }}
optional: true
{{- end }}
{{- if not (empty .Values.managedFederation.graphRef) }}
Expand Down
2 changes: 1 addition & 1 deletion helm/chart/router/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
{{- include "apollographql.templatizeExtraLabels" . | trim | nindent 4 }}
{{- end }}
data:
managedFederationApiKey: {{ default "MISSING" .Values.managedFederation.apiKey | b64enc | quote }}
{{ (.Values.managedFederation.existingSecretKeyRefKey | default "managedFederationApiKey") }}: {{ default "MISSING" .Values.managedFederation.apiKey | b64enc | quote }}
{{- end }}
3 changes: 3 additions & 0 deletions helm/chart/router/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ managedFederation:
# -- If using managed federation, use existing Secret which stores the graph API key instead of creating a new one.
# If set along `managedFederation.apiKey`, a secret with the graph API key will be created using this parameter as name
existingSecret:
# -- If using managed federation, the name of the key within the existing Secret which stores the graph API key.
# If set along `managedFederation.apiKey`, a secret with the graph API key will be created using this parameter as key, defaults to using a key of `managedFederationApiKey`
existingSecretKeyRefKey:
# -- If using managed federation, the variant of which graph to use
graphRef: ""

Expand Down