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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made existing context settings configurable (`context`, `context_estimated_count`, `context_estimated_cost`, `context_stats_ttl`)
- Automatic queue processor CronJob created when `use_queue` is "true" (configurable schedule via `queueProcessor.schedule`)
- Automatic extent updater CronJob created when `update_collection_extent` is "false" (configurable schedule via `extentUpdater.schedule`)
- Added ConfigMap checksum annotations to automatically restart pods when configuration changes [#344](https://github.com/developmentseed/eoapi-k8s/pull/344)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions charts/eoapi/templates/services/multidim/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
app: {{ .Release.Name }}-multidim
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/services/multidim/configmap.yaml") . | sha256sum }}
labels:
{{- include "eoapi.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: multidim
Expand Down
2 changes: 2 additions & 0 deletions charts/eoapi/templates/services/raster/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
app: {{ .Release.Name }}-raster
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/services/raster/configmap.yaml") . | sha256sum }}
labels:
{{- include "eoapi.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: raster
Expand Down
2 changes: 2 additions & 0 deletions charts/eoapi/templates/services/stac/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
app: {{ .Release.Name }}-stac
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/services/stac/configmap.yaml") . | sha256sum }}
labels:
{{- include "eoapi.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: stac
Expand Down
2 changes: 2 additions & 0 deletions charts/eoapi/templates/services/vector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ spec:
app: {{ .Release.Name }}-vector
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/services/vector/configmap.yaml") . | sha256sum }}
labels:
{{- include "eoapi.selectorLabels" . | nindent 8 }}
app.kubernetes.io/component: vector
Expand Down
14 changes: 14 additions & 0 deletions charts/eoapi/tests/multidim_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ tests:
path: metadata.labels.gitsha
value: "ABC123"

- it: "multidim deployment includes configmap checksum annotation"
set:
multidim.enabled: true
stac.enabled: false
raster.enabled: false
vector.enabled: false
template: templates/services/multidim/deployment.yaml
asserts:
- exists:
path: spec.template.metadata.annotations["checksum/config"]
- matchRegex:
path: spec.template.metadata.annotations["checksum/config"]
pattern: ^[a-f0-9]{64}$

- it: "multidim configmap defaults"
set:
raster.enabled: false
Expand Down
15 changes: 15 additions & 0 deletions charts/eoapi/tests/raster_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ tests:
- equal:
path: spec.template.spec.containers[0].resources.requests.memory
value: "3072Mi"

- it: "raster deployment includes configmap checksum annotation"
set:
raster.enabled: true
stac.enabled: false
vector.enabled: false
multidim.enabled: false
gitSha: "ABC123"
template: templates/services/raster/deployment.yaml
asserts:
- exists:
path: spec.template.metadata.annotations["checksum/config"]
- matchRegex:
path: spec.template.metadata.annotations["checksum/config"]
pattern: ^[a-f0-9]{64}$
- equal:
path: metadata.labels.gitsha
value: "ABC123"
Expand Down
14 changes: 14 additions & 0 deletions charts/eoapi/tests/stac_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ tests:
path: metadata.labels.gitsha
value: "ABC123"

- it: "stac deployment includes configmap checksum annotation"
set:
stac.enabled: true
raster.enabled: false
vector.enabled: false
multidim.enabled: false
template: templates/services/stac/deployment.yaml
asserts:
- exists:
path: spec.template.metadata.annotations["checksum/config"]
- matchRegex:
path: spec.template.metadata.annotations["checksum/config"]
pattern: ^[a-f0-9]{64}$

- it: "stac configmap defaults"
set:
raster.enabled: false
Expand Down
14 changes: 14 additions & 0 deletions charts/eoapi/tests/vector_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ tests:
path: metadata.labels.gitsha
value: "ABC123"

- it: "vector deployment includes configmap checksum annotation"
set:
vector.enabled: true
stac.enabled: false
raster.enabled: false
multidim.enabled: false
template: templates/services/vector/deployment.yaml
asserts:
- exists:
path: spec.template.metadata.annotations["checksum/config"]
- matchRegex:
path: spec.template.metadata.annotations["checksum/config"]
pattern: ^[a-f0-9]{64}$

- it: "vector configmap defaults"
set:
raster.enabled: false
Expand Down