[stable/docker-registry] Add pod annotations and checksum for configmap to deployment (#5080)

* Add pod annotations and checksum for configmap to deployment

The will allow us to annotate the pod as necessicary and will restart the Deployemnt on ConfigMap changes

* Fix path in configmap checksu annotation

* Use Template.basePath to find ConfigMap

Using print $.Chart.Name "/templates/configmap.yaml" does not work when this is used as a subchart

* Add podAnnotations to README
This commit is contained in:
Pete Brown
2018-04-26 10:14:02 -07:00
committed by k8s-ci-robot
parent b7cf30cfbb
commit 7d8367b279
4 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.1.3
version: 1.2.0
appVersion: 2.6.2
home: https://hub.docker.com/_/registry/
icon: https://hub.docker.com/public/images/logos/mini-logo.svg
+1
View File
@@ -40,6 +40,7 @@ their default values.
| `service.nodePort` | if `service.type` is `NodePort` and this is non-empty, sets the node port of the service | `nil` |
| `replicaCount` | k8s replicas | `1` |
| `updateStrategy` | update strategy for deployment | `{}` |
| `podAnnotations` | Annotations for pod | `{}` |
| `resources.limits.cpu` | Container requested CPU | `nil` |
| `resources.limits.memory` | Container requested memory | `nil` |
| `storage` | Storage system to use | `filesystem` |
@@ -19,6 +19,11 @@ spec:
labels:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if $.Values.podAnnotations }}
{{ toYaml $.Values.podAnnotations | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
+2
View File
@@ -9,6 +9,8 @@ updateStrategy:
# maxSurge: 1
# maxUnavailable: 0
podAnnotations: {}
image:
repository: registry
tag: 2.6.2