【发布时间】:2019-03-10 13:28:07
【问题描述】:
当有 confimap 或秘密更改时,我正在尝试重新启动 pod。我已经尝试过与以下描述相同的代码:https://github.com/helm/helm/blob/master/docs/charts_tips_and_tricks.md#automatically-roll-deployments-when-configmaps-or-secrets-change 但是,更新 configmap 后,我的 pod 没有重新启动。您知道这里可能做错了什么吗?
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "app.fullname" . }}
labels:
app: {{ template "app.name" . }}
{{- include "global_labels" . | indent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "app.name" . }}
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yml") . | sha256sum }}
【问题讨论】:
标签: kubernetes yaml kubernetes-helm