Skip to content

Commit

Permalink
Add checksum to deployments and statefulsets:
Browse files Browse the repository at this point in the history
- Add checksum for deployments/statefulsets so they are redeployed if config change
- Rename files to follow same naming

Signed-off-by: Julio Chana <[email protected]>
  • Loading branch information
Julio Chana committed Nov 29, 2018
1 parent e6068ee commit 2adf20e
Show file tree
Hide file tree
Showing 20 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/adminserver/adminserver-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
component: adminserver
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/adminserver/adminserver-cm.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/adminserver/adminserver-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: adminserver
Expand Down
3 changes: 3 additions & 0 deletions templates/chartmuseum/chartmuseum-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ spec:
component: chartmuseum
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-cm.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/chartmuseum/chartmuseum-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: chartmuseum
Expand Down
2 changes: 2 additions & 0 deletions templates/clair/clair-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
component: clair
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/clair/clair-cm.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: clair
Expand Down
3 changes: 3 additions & 0 deletions templates/core/core-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
component: core
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/core/core-cm.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/core/core-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.matchLabels" . | indent 8 }}
component: core
Expand Down
2 changes: 2 additions & 0 deletions templates/database/database-ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ spec:
component: database
template:
metadata:
annotations:
checksum/secret: {{ include (print $.Template.BasePath "/database/database-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: database
Expand Down
3 changes: 3 additions & 0 deletions templates/jobservice/jobservice-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
component: jobservice
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/jobservice/jobservice-cm.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/jobservice/jobservice-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: jobservice
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ spec:
component: nginx
template:
metadata:
annotations:
{{- if and (ne .Values.expose.type "ingress") (not .Values.expose.tls.enabled) }}
checksum/configmap: {{ include (print $.Template.BasePath "/nginx/nginx-cm-http.yaml") . | sha256sum }}
{{- else if and (ne .Values.expose.type "ingress") .Values.expose.tls.enabled }}
checksum/configmap: {{ include (print $.Template.BasePath "/nginx/nginx-cm-https.yaml") . | sha256sum }}
{{- end }}
checksum/secret: {{ include (print $.Template.BasePath "/nginx/nginx-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: nginx
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions templates/notary/notary-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
component: notary-server
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/notary/notary-cm.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: notary-server
Expand Down
2 changes: 2 additions & 0 deletions templates/notary/notary-signer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
component: notary-signer
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/notary/notary-cm.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: notary-signer
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions templates/registry/registry-dpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ spec:
component: registry
template:
metadata:
annotations:
checksum/configmap: {{ include (print $.Template.BasePath "/registry/registry-cm.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/registry/registry-secret.yaml") . | sha256sum }}
labels:
{{ include "harbor.labels" . | indent 8 }}
component: registry
Expand Down

0 comments on commit 2adf20e

Please sign in to comment.