You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a sub-chart that is included as a dependency in the parent chart.
We want to roll out the deployment of a pod within the parent chart whenever there's any modification in either the parent chart's config map or the sub-chart's config map. For parent chart config map alterations, we've implemented a process that involves reading the configmap YAML file and computing its checksum, as outlined in the Helm documentation.
Could you please assist me how we can achieve the same for reading a sub-chart's config map YAML file and calculating its checksum?
likely the lookup function would work here (but I would use this function with caution, it can makes your chart behavior awkwardly non-deterministic; calculating a hash of a config map seems reasonable through)
Output of
helm version
: Version:"v3.10.1"Output of
kubectl version
:Client Version: v1.27.4Kustomize Version: v5.0.1
Server Version: v1.27.11-gke.1062000
Cloud Provider/Platform (AKS, GKE, Minikube etc.): GKE
We have a sub-chart that is included as a dependency in the parent chart.
We want to roll out the deployment of a pod within the parent chart whenever there's any modification in either the parent chart's config map or the sub-chart's config map. For parent chart config map alterations, we've implemented a process that involves reading the configmap YAML file and computing its checksum, as outlined in the Helm documentation.
Could you please assist me how we can achieve the same for reading a sub-chart's config map YAML file and calculating its checksum?
Parent Chart.yaml
apiVersion: v2
appVersion: 1.0.0
dependencies:
version: 1.0.0
repository: alias:alias-repo
description: A Helm chart for Kubernetes
name: parent-chart
type: application
version: 1.0.0
Parent Template to calculate checksum
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Values.pod1.deploymentName }}
spec:
replicas: {{ int .Values.pod1.replicaCount }}
selector:
matchLabels:
name: {{ .Values.pod1.appName }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/parent-chart-configmap.yaml") . | sha256sum }}
Sub-chart has a configmap with some of the properties.
The text was updated successfully, but these errors were encountered: