diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index e1d6bfab1b..063c149376 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -59,6 +59,14 @@ telemetry: By [@bryncooke](https://github.com/bryncooke) in https://github.com/apollographql/router/pull/1970 ## 🚀 Features + +### Re-Deploy Router Pods If The SuperGraph Configmap Changes ([PR #2223](https://github.com/apollographql/router/pull/2223)) +When setting the supergraph with th the `supergraphFile` variable a `sha256` checksum is calculated and set as an annotation for the router pods. This will spin up new pods when the supergraph is mounted via config map and the schema has changed. + +Note: It is preferable to not have `--hot-reload` enabled with this feature since re-configuring the router during a pod restart is duplicating the work and may cause confusion in log messaging. + +By [@toneill818](https://github.com/toneill818) in https://github.com/apollographql/router/pull/2223 + ### Tracing batch span processor is now configurable ([Issue #2232](https://github.com/apollographql/router/issues/2232)) Exporting traces often requires performance tuning based on the throughput of the router, sampling settings and ingestion capability of tracing ingress. diff --git a/helm/chart/router/templates/deployment.yaml b/helm/chart/router/templates/deployment.yaml index 05ec4abc0a..9ebc162d2b 100644 --- a/helm/chart/router/templates/deployment.yaml +++ b/helm/chart/router/templates/deployment.yaml @@ -20,9 +20,14 @@ spec: {{- include "router.selectorLabels" . | nindent 6 }} template: metadata: - {{- with .Values.podAnnotations }} + {{- if or .Values.podAnnotations .Values.supergraphFile }} annotations: - {{- toYaml . | nindent 8 }} + {{- if .Values.supergraphFile }} + checksum/supergraph-config-map: {{ .Values.supergraphFile | sha256sum }} + {{- end }} + {{- if .Values.podAnnotations }} + {{- toYaml .Values.podAnnotations | nindent 8 }} + {{- end }} {{- end }} labels: {{- include "router.selectorLabels" . | nindent 8 }}