PePe Amengual
10/08/2025, 11:03 PM---
repositories:
- name: prometheus
url: https://prometheus-community.github.io/helm-charts
releases:
- name: prometheus
chart: prometheus/prometheus
version: 27.39.0
namespace: monitoring
createNamespace: true
force: false
values:
- mgmt-wus3-prometheus.helmfile.vars.yaml
But we want to avoid passing the filename mgmt-wus3-prometheus.helmfile.vars.yaml or if we have to have a way to templetarize the name so it can be environment agnostic, we tries many things from the helmfile docs and they just do not work, is there any magic in atmos that helps resolve this? at the end of the day is atmos creating mgmt-wus3-prometheus.helmfile.vars.yaml file.PePe Amengual
10/08/2025, 11:03 PMAndriy Knysh (Cloud Posse)
10/09/2025, 12:07 AMIn Helmfile, variable precedence (from lowest to highest priority) works as follows:
Values defined in the Helm chart itself (values.yaml)
Values specified in the Helmfile release definition (e.g.,
releases:
- name: myapp
values:
- values.yaml
- custom.yaml
or inline YAML under releases.values)
Values provided via --state-values-file flag
Values provided via --set or --set-file flags on the command line
✅ Priority rule:
Values from --state-values-file override any values defined in the Helmfile configuration.
That means if the same key exists in both a Helmfile values: section and a file passed via --state-values-file, the one from --state-values-file wins.Andriy Knysh (Cloud Posse)
10/09/2025, 12:08 AM--state-values-file to provide it to helmfile
helmfile apply --state-values-file=mgmt-wus3-prometheus.helmfile.vars.yamlAndriy Knysh (Cloud Posse)
10/09/2025, 12:08 AMvalues (which will make your helmfile config generic)Andriy Knysh (Cloud Posse)
10/09/2025, 12:09 AMPePe Amengual
10/09/2025, 12:36 AMvalues:
mgmt-wus3-prometheus.helmfile.vars.yaml
◦ no values are passes to helmfilePePe Amengual
10/09/2025, 12:38 AMPePe Amengual
10/09/2025, 12:47 AMatmos helmfile apply grafana -s mgmt-wus3 --logs-level Debug ✔ 5907 17:34:40
DEBU Set logs-level=debug logs-file=/dev/stderr
DEBU Found config ENV ATMOS_CLI_CONFIG_PATH=./config
DEBU Found ENV variable ATMOS_BASE_PATH=./
DEBU Found ENV variable ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH=/Users/pepe/.kube/config
DEBU Found config ENV ATMOS_CLI_CONFIG_PATH=./config
DEBU Found ENV variable ATMOS_BASE_PATH=./
DEBU Found ENV variable ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH=/Users/pepe/.kube/config
DEBU Found config ENV ATMOS_CLI_CONFIG_PATH=./config
DEBU Found ENV variable ATMOS_BASE_PATH=./
DEBU Found ENV variable ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH=/Users/pepe/.kube/config
DEBU Found component 'grafana' in the stack 'mgmt-wus3' in the stack manifest 'myapp/management/wus3/helm'
DEBU ProcessTmplWithDatasources template=templates-all-atmos-sections
DEBU ProcessTmplWithDatasources template=templates-all-atmos-sections evaluation=1
DEBU ProcessTmplWithDatasources: processed template=templates-all-atmos-sections
DEBU Resolved component path type=helmfile component=grafana resolved_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana base_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile env_override=false
DEBU Resolved component path type=helmfile component=grafana resolved_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana base_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile env_override=false
DEBU Variables for component in stack component=grafana stack=mgmt-wus3 variables="map[autoscaling:map[enabled:true] environment:wus3 namespace:mgmt tolerations:[map[effect:NoSchedule key:CriticalAddonsOnly operator:Equal value:true]]]"
DEBU Resolved component path type=helmfile component=grafana resolved_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana base_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile env_override=false
DEBU Writing the variables to file: file=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana/mgmt-wus3-grafana.helmfile.vars.yaml
DEBU
Command info:
DEBU Helmfile binary: helmfile
DEBU Helmfile command: apply
DEBU Global options=[]
DEBU Arguments and flags additional=[]
DEBU Component: grafana
DEBU Stack: mgmt-wus3
DEBU Resolved component path type=helmfile component=grafana resolved_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana base_path=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile env_override=false
DEBU Using working dir=/Users/pepe/Documents/ORG/pepe-iac/components/helmfile/grafana
DEBU Using ENV vars:
DEBU STACK=mgmt-wus3
DEBU NAMESPACE=mgmt
DEBU TENANT=
DEBU ENVIRONMENT=wus3
DEBU STAGE=
DEBU REGION=
DEBU KUBECONFIG=/Users/pepe/.kube/config
DEBU ATMOS_CLI_CONFIG_PATH=/Users/pepe/Documents/ORG/pepe-iac/config
DEBU ATMOS_BASE_PATH=/Users/pepe/Documents/ORG/pepe-iac
DEBU Executing command="/opt/homebrew/bin/helmfile --state-values-file mgmt-wus3-grafana.helmfile.vars.yaml apply"
Adding repo grafana https://grafana.github.io/helm-charts
"grafana" has been added to your repositories
Comparing release=grafana, chart=grafana/grafana, namespace=monitoring
monitoring, grafana, Deployment (apps) has changed:
# Source: grafana/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: monitoring
labels:
helm.sh/chart: grafana-10.0.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
app.kubernetes.io/version: "12.1.1"
spec:
+ replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
strategy:
type: RollingUpdate
template:
metadata:
labels:
helm.sh/chart: grafana-10.0.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: grafana
app.kubernetes.io/version: "12.1.1"
annotations:
checksum/config: 0e9cbd043253452345234523453425234523452345234
checksum/sc-dashboard-provider-config: e70bf6a32452345234523452345234523452345
- checksum/secret: 15ae5b58732432452345324523452345234523452345
+ checksum/secret: 4d6cc534523452345234523452345234523453452345
kubectl.kubernetes.io/default-container: grafana
spec:
serviceAccountName: grafana
automountServiceAccountToken: true
shareProcessNamespace: false
securityContext:
fsGroup: 472
runAsGroup: 472
runAsNonRoot: true
runAsUser: 472
enableServiceLinks: true
containers:
- name: grafana
image: "docker.io/grafana/grafana:12.1.1"
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: "/etc/grafana/grafana.ini"
subPath: grafana.ini
- name: storage
mountPath: "/var/lib/grafana"
ports:
- name: grafana
containerPort: 3000
protocol: TCP
- name: gossip-tcp
containerPort: 9094
protocol: TCP
- name: gossip-udp
containerPort: 9094
protocol: UDP
- name: profiling
containerPort: 6060
protocol: TCP
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana
key: admin-user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana
key: admin-password
- name: GF_PATHS_DATA
value: /var/lib/grafana/
- name: GF_PATHS_LOGS
value: /var/log/grafana
- name: GF_PATHS_PLUGINS
value: /var/lib/grafana/plugins
- name: GF_PATHS_PROVISIONING
value: /etc/grafana/provisioning
livenessProbe:
failureThreshold: 10
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 60
timeoutSeconds: 30
readinessProbe:
httpGet:
path: /api/health
port: 3000
- tolerations:
- - effect: NoSchedule
- key: CriticalAddonsOnly
- operator: Equal
- value: "true"
volumes:
- name: config
configMap:
name: grafana
- name: storage
emptyDir: {}
monitoring, grafana, Secret (v1) has changed:
# Source: grafana/templates/secret.yaml
apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: grafana
app.kubernetes.io/name: grafana
app.kubernetes.io/version: 12.1.1
helm.sh/chart: grafana-10.0.0
name: grafana
namespace: monitoring
data:
- admin-password: '-------- # (40 bytes)'
+ admin-password: '++++++++ # (40 bytes)'
admin-user: 'REDACTED # (5 bytes)'
ldap-toml: 'REDACTED # (0 bytes)'
type: Opaque
monitoring, grafana, HorizontalPodAutoscaler (autoscaling) has been removed:
- # Source: grafana/templates/hpa.yaml
- apiVersion: autoscaling/v2
- kind: HorizontalPodAutoscaler
- metadata:
- name: grafana
- namespace: monitoring
- labels:
- app.kubernetes.io/name: grafana
- helm.sh/chart: grafana-10.0.0
- app.kubernetes.io/instance: grafana
- spec:
- scaleTargetRef:
- apiVersion: apps/v1
- kind: Deployment
- name: grafana
- minReplicas: 1
- maxReplicas: 5
- metrics:
- - type: Resource
- resource:
- name: cpu
- target:
- type: Utilization
- averageUtilization: 60
+
Upgrading release=grafana, chart=grafana/grafana, namespace=monitoring
Release "grafana" has been upgraded. Happy Helming!
NAME: grafana
LAST DEPLOYED: Wed Oct 8 17:35:55 2025
NAMESPACE: monitoring
STATUS: deployed
REVISION: 4
NOTES:
1. Get your 'admin' user password by running:
kubectl get secret --namespace monitoring grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
2. The Grafana server can be accessed via port 80 on the following DNS name from within your cluster:
grafana.monitoring.svc.cluster.local
Get the Grafana URL to visit by running these commands in the same shell:
export POD_NAME=$(kubectl get pods --namespace monitoring -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace monitoring port-forward $POD_NAME 3000
3. Login with the password from step 1 and the username: admin
#################################################################################
###### WARNING: Persistence is disabled!!! You will lose your data when #####
###### the Grafana pod is terminated. #####
#################################################################################
Listing releases matching ^grafana$
grafana monitoring 4 2025-10-08 17:35:55.707175 -0700 PDT deployed grafana-10.0.0 12.1.1
UPDATED RELEASES:
NAME NAMESPACE CHART VERSION DURATION
grafana monitoring grafana/grafana 10.0.0 7s
DEBU Found config ENV ATMOS_CLI_CONFIG_PATH=./config
DEBU Found ENV variable ATMOS_BASE_PATH=./
DEBU Found ENV variable ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH=/Users/pepe/.kube/config
DEBU Found config ENV ATMOS_CLI_CONFIG_PATH=./config
DEBU Found ENV variable ATMOS_BASE_PATH=./
DEBU Found ENV variable ATMOS_COMPONENTS_HELMFILE_KUBECONFIG_PATH=/Users/pepe/.kube/config
DEBU Telemetry event enqueuedPePe Amengual
10/09/2025, 12:48 AMPePe Amengual
10/09/2025, 12:49 AM---
vars:
namespace: "mgmt"
environment: "wus3"
components:
helmfile:
grafana:
vars:
autoscaling:
enabled: true
tolerations:
- key: "CriticalAddonsOnly"
operator: "Equal"
value: "true"
effect: "NoSchedule"Andriy Knysh (Cloud Posse)
10/09/2025, 2:51 AMAndriy Knysh (Cloud Posse)
10/09/2025, 2:52 AMvariables.yaml for the Helm Chart, then reproduce the same structure in the Atmos component varsAndriy Knysh (Cloud Posse)
10/09/2025, 2:57 AMautoscaling is under globalAndriy Knysh (Cloud Posse)
10/09/2025, 2:57 AMtolerations as wellAndriy Knysh (Cloud Posse)
10/09/2025, 2:58 AMcomponents:
helmfile:
grafana:
vars:
global:
autoscaling:
enabled: true
tolerations:
- key: "CriticalAddonsOnly"
operator: "Equal"
value: "true"
effect: "NoSchedule"Andriy Knysh (Cloud Posse)
10/09/2025, 2:58 AMAndriy Knysh (Cloud Posse)
10/09/2025, 3:00 AMautoscaling and tolerations not under global, it will accept it and silently ignore (opposite to the Azure chart you deployed a week ago which had a strict schema config and it did not allow providing variables that are not in the defined schema)Andriy Knysh (Cloud Posse)
10/09/2025, 3:02 AMvariables.yaml for the chart and configure exactly the same structure in Atmos. In fact, you can just copy the whole file https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml into the vars section for the component and it will work b/c both the Chart and the Atmos vars section are YAML.
The chart will deep merge the values from variables.yaml with the values provided on the command line (from Atmos -> Helmfile), so if you don't provide some values in the stack config, they will be taken from variables.yaml (that's why you don't have to copy the entire content of variables.yaml into the vars section).
you can consider variables.yaml similar to the default values in Atmos (base component)PePe Amengual
10/09/2025, 3:10 AMPePe Amengual
10/09/2025, 3:10 AMPePe Amengual
10/09/2025, 8:49 PMPePe Amengual
10/09/2025, 8:51 PMmgmt-wus3-prometheus.helmfile.vars.yaml and you pass it to helmfile in the values: section this works, so it means that the structure from the stack is correctPePe Amengual
10/09/2025, 8:51 PMAndriy Knysh (Cloud Posse)
10/09/2025, 9:01 PMI checked this and global, autoscaling and tolerations are all at the root levelwhat chart are you using?
PePe Amengual
10/09/2025, 9:10 PMPePe Amengual
10/09/2025, 9:12 PM---
repositories:
- name: grafana
url: https://grafana.github.io/helm-charts
releases:
- name: grafana
chart: grafana/grafana
version: 10.0.0
namespace: monitoring
createNamespace: true
force: false
values:
- mgmt-wus3-grafana.helmfile.vars.yamlAndriy Knysh (Cloud Posse)
10/09/2025, 9:56 PMtolerations is at the root (which is diff from the other grafana chart)
## Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []PePe Amengual
10/09/2025, 9:56 PMAndriy Knysh (Cloud Posse)
10/09/2025, 9:57 PMreleases, it does not accept the varfile from --state-values-filePePe Amengual
10/09/2025, 10:00 PMAndriy Knysh (Cloud Posse)
10/09/2025, 10:14 PMAndriy Knysh (Cloud Posse)
10/09/2025, 10:15 PM--state-values-file by AtmosGabriela Campana (Cloud Posse)
10/09/2025, 11:19 PM