feat: add gitRevision annotation for auto-restart on git changes
This commit is contained in:
@@ -18,6 +18,9 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: storefront
|
app: storefront
|
||||||
|
annotations:
|
||||||
|
# Git revision annotation - changes with each commit to force pod restart
|
||||||
|
gitRevision: ${GIT_REVISION}
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: clone
|
- name: clone
|
||||||
|
|||||||
@@ -4,13 +4,3 @@ resources:
|
|||||||
- deployment-nodejs.yaml
|
- deployment-nodejs.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
|
|
||||||
# Generate a ConfigMap with git revision info
|
|
||||||
# This ConfigMap changes on each Flux reconciliation, triggering pod restarts
|
|
||||||
configMapGenerator:
|
|
||||||
- name: deployment-metadata
|
|
||||||
literals:
|
|
||||||
- GIT_REVISION=${GIT_REVISION}
|
|
||||||
- DEPLOY_TIME=${DEPLOY_TIME}
|
|
||||||
options:
|
|
||||||
disableNameSuffixHash: false # Changing hash forces pod restart
|
|
||||||
|
|||||||
Reference in New Issue
Block a user