PePe Amengual
10/02/2025, 7:04 PMenvironment, namespace etc and since that is how our name_pattern we need to use them, so how could I avoid those variables to be pass to helmfile?Andriy Knysh (Cloud Posse)
10/02/2025, 7:07 PMPePe Amengual
10/02/2025, 7:10 PMvars:
namespace: "mgmt"
environment: "wus3"
components:
helmfile:
ingress-nginx:
vars:
controller:
ingressClassResource:
default: true
autoscaling:
enabled: true
nodeSelector:
Apps: SystemApps
tolerations:
- key: "CriticalAddonsOnly"
operator: "Equal"
value: "true"
effect: "NoSchedule"
cert-manager:
metadata:
component: "letsencrypt-certbot"
vars:
installCRDs: true
crds:
enabled: true
nodeSelector:
Apps: SystemApps
tolerations:
- key: "CriticalAddonsOnly"
operator: "Equal"
value: "true"
effect: "NoSchedule"PePe Amengual
10/02/2025, 7:10 PM---
repositories:
- name: cert-manager
url: https://charts.jetstack.io/
releases:
- name: cert-manager
chart: cert-manager/cert-manager
version: 1.18.2
namespace: cert-manager
createNamespace: true
force: false
values:
- mgmt-wus3-cert-manager.helmfile.vars.yamlPePe Amengual
10/02/2025, 7:10 PMPePe Amengual
10/02/2025, 7:11 PM{.vars.environment} to the values....Andriy Knysh (Cloud Posse)
10/02/2025, 7:16 PMnamespace: cert-manager is not an Atmos namespace, it's a k8s namespaceAndriy Knysh (Cloud Posse)
10/02/2025, 7:16 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:18 PM{{.vars.environment}}PePe Amengual
10/02/2025, 7:22 PMnamespace: cert-manager that is not part of the valuesPePe Amengual
10/02/2025, 7:23 PMenvironment:Andriy Knysh (Cloud Posse)
10/02/2025, 7:24 PMenvironment?PePe Amengual
10/02/2025, 7:24 PMatmos helmfile diff cert-manager -s mgmt-wus3 ✔ 5557 12:07:50
Adding repo cert-manager https://charts.jetstack.io/
"cert-manager" has been added to your repositories
Comparing release=cert-manager, chart=cert-manager/cert-manager, namespace=cert-manager
in ./helmfile.yaml: command "/opt/homebrew/bin/helm" exited with non-zero status:
PATH:
/opt/homebrew/bin/helm
ARGS:
0: helm (4 bytes)
1: diff (4 bytes)
2: upgrade (7 bytes)
3: --allow-unreleased (18 bytes)
4: cert-manager (12 bytes)
5: cert-manager/cert-manager (25 bytes)
6: --version (9 bytes)
7: 1.18.2 (6 bytes)
8: --namespace (11 bytes)
9: cert-manager (12 bytes)
10: --values (8 bytes)
11: /var/folders/d4/_zh74d4n04n9yf9f2wqsl3640000gn/T/helmfile416742790/cert-manager-cert-manager-values-c84f5d879 (109 bytes)
12: --reset-values (14 bytes)
13: --color (7 bytes)
ERROR:
exit status 1
EXIT STATUS
1
STDERR:
Error: Failed to render chart: exit status 1: Error: values don't meet the specifications of the schema(s) in the following chart(s):
cert-manager:
- at '': additional properties 'environment' not allowed
Error: plugin "diff" exited with error
COMBINED OUTPUT:
Error: Failed to render chart: exit status 1: Error: values don't meet the specifications of the schema(s) in the following chart(s):
cert-manager:
- at '': additional properties 'environment' not allowed
Error: plugin "diff" exited with error
Error
exit status 1Andriy Knysh (Cloud Posse)
10/02/2025, 7:26 PMenvironment: "wus3" sent in the variables to the chart?PePe Amengual
10/02/2025, 7:27 PMPePe Amengual
10/02/2025, 7:27 PMcrds:
enabled: true
environment: wus3
namespace: mgmt
nodeSelector:
Apps: SystemApps
tolerations:
- effect: NoSchedule
key: CriticalAddonsOnly
operator: Equal
value: "true"PePe Amengual
10/02/2025, 7:28 PMenvironment and namespace and run helmfile from the component/ folder it worksAndriy Knysh (Cloud Posse)
10/02/2025, 7:29 PMPePe Amengual
10/02/2025, 7:29 PMPePe Amengual
10/02/2025, 7:30 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:32 PMPePe Amengual
10/02/2025, 7:33 PMPePe Amengual
10/02/2025, 7:34 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:39 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:39 PMPePe Amengual
10/02/2025, 7:39 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:50 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:50 PMYou're hitting Helm's values.schema.json gate: the cert-manager chart sets "additionalProperties": false at the root, so any key it doesn't explicitly allow (like your environment) is rejected.Andriy Knysh (Cloud Posse)
10/02/2025, 7:51 PMDon't pass environment to that chart (cleanest)
Keep environment for Atmos/Helmfile templating, but strip it out of the values you pass to the chart.
Put your chart values in a templated file (Helmfile supports Go templates for values files).
Example values.cert-manager.yaml.gotmpl:
{{- /* . is the Helmfile template context, not the chart .Values */ -}}
{{- $vals := readFile "values.base.yaml" | fromYaml -}}
{{- /* Drop top-level keys your chart doesn't accept */ -}}
{{- $vals = omit $vals "environment" -}}
{{ $vals | toYaml }}
Then in your Helmfile release:
releases:
- name: cert-manager
chart: jetstack/cert-manager
namespace: mgmt
values:
- values.cert-manager.yaml.gotmplAndriy Knysh (Cloud Posse)
10/02/2025, 7:52 PMTell Helm to skip value-schema validation (fastest)
If you must pass extra keys (or you don't want to fuss with templating), you can disable the values schema check:
Helm CLI supports --skip-schema-validation on install, upgrade, and template.
Helmfile exposes this as skipSchemaValidation: true (globally via helmDefaults or per release).
helmDefaults:
skipSchemaValidation: true # requires Helm >= 3.16
Caveat: you're opting out of a useful safety net. Use when you trust your inputs.PePe Amengual
10/02/2025, 7:54 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:55 PMPePe Amengual
10/02/2025, 7:55 PMAndriy Knysh (Cloud Posse)
10/02/2025, 7:55 PMPePe Amengual
10/02/2025, 7:55 PMPePe Amengual
10/02/2025, 7:57 PMGirish Maddineni
10/02/2025, 8:57 PMatmos helmfile apply command and successfully apply resources go into kube-system namespace but, failing for cert-manger namespace since it's overriding the Namespace of cert-manger with Namespace we use for stack recognition "mgmt" in this case.
Reference of resource failures
-
+ # Source: cert-manager/templates/webhook-service.yaml
+ apiVersion: v1
+ kind: Service
+ metadata:
+ name: cert-manager-webhook
+ namespace: mgmt
+ labels:
+ app: webhook
+ app.kubernetes.io/name: webhook
+ app.kubernetes.io/instance: cert-manager
+ app.kubernetes.io/component: "webhook"
+ app.kubernetes.io/version: "v1.18.2"
+ app.kubernetes.io/managed-by: Helm
+ helm.sh/chart: cert-manager-v1.18.2
+ spec:
+ type: ClusterIP
+ ports:
+ - name: https
+ port: 443
+ protocol: TCP
+ targetPort: "https"
+ - name: metrics
+ port: 9402
+ protocol: TCP
+ targetPort: "http-metrics"
+ selector:
+ app.kubernetes.io/name: webhook
+ app.kubernetes.io/instance: cert-manager
+ app.kubernetes.io/component: "webhook"
mgmt, cert-manager-webhook, ServiceAccount (v1) has been added:
-
+ # Source: cert-manager/templates/webhook-serviceaccount.yaml
+ apiVersion: v1
+ kind: ServiceAccount
+ automountServiceAccountToken: true
+ metadata:
+ name: cert-manager-webhook
+ namespace: mgmt
+ labels:
+ app: webhook
+ app.kubernetes.io/name: webhook
+ app.kubernetes.io/instance: cert-manager
+ app.kubernetes.io/component: "webhook"
+ app.kubernetes.io/version: "v1.18.2"
+ app.kubernetes.io/managed-by: Helm
+ helm.sh/chart: cert-manager-v1.18.2
mgmt, cert-manager-webhook:dynamic-serving, Role (rbac.authorization.k8s.io) has been added:
-
+ # Source: cert-manager/templates/webhook-rbac.yaml
+ apiVersion: rbac.authorization.k8s.io/v1
+ kind: Role
+ metadata:
+ name: cert-manager-webhook:dynamic-serving
+ namespace: mgmt
+ labels:
+ app: webhook
+ app.kubernetes.io/name: webhook
+ app.kubernetes.io/instance: cert-manager
+ app.kubernetes.io/component: "webhook"
+ app.kubernetes.io/version: "v1.18.2"
+ app.kubernetes.io/managed-by: Helm
+ helm.sh/chart: cert-manager-v1.18.2
+ rules:
+ - apiGroups: [""]
+ resources: ["secrets"]
+ resourceNames:
+ - 'cert-manager-webhook-ca'
+ verbs: ["get", "list", "watch", "update"]
+ # It's not possible to grant CREATE permission on a single resourceName.
+ - apiGroups: [""]
+ resources: ["secrets"]
+ verbs: ["create"]
mgmt, cert-manager-webhook:dynamic-serving, RoleBinding (rbac.authorization.k8s.io) has been added:
-
+ # Source: cert-manager/templates/webhook-rbac.yaml
+ apiVersion: rbac.authorization.k8s.io/v1
+ kind: RoleBinding
+ metadata:
+ name: cert-manager-webhook:dynamic-serving
+ namespace: mgmt
+ labels:
+ app: webhook
+ app.kubernetes.io/name: webhook
+ app.kubernetes.io/instance: cert-manager
+ app.kubernetes.io/component: "webhook"
+ app.kubernetes.io/version: "v1.18.2"
+ app.kubernetes.io/managed-by: Helm
+ helm.sh/chart: cert-manager-v1.18.2
+ roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: Role
+ name: cert-manager-webhook:dynamic-serving
+ subjects:
+ - kind: ServiceAccount
+ name: cert-manager-webhook
+ namespace: mgmtGirish Maddineni
10/02/2025, 8:59 PMUpgrading release=cert-manager, chart=cert-manager/cert-manager, namespace=cert-manager
Release "cert-manager" does not exist. Installing it now.
FAILED RELEASES:
NAME NAMESPACE CHART VERSION DURATION
cert-manager cert-manager cert-manager/cert-manager 8s
in ./helmfile.yaml: failed processing release cert-manager: command "/opt/homebrew/bin/helm" exited with non-zero status:
PATH:
/opt/homebrew/bin/helm
ARGS:
0: helm (4 bytes)
1: upgrade (7 bytes)
2: --install (9 bytes)
3: cert-manager (12 bytes)
4: cert-manager/cert-manager (25 bytes)
5: --version (9 bytes)
6: 1.18.2 (6 bytes)
7: --create-namespace (18 bytes)
8: --skip-schema-validation (24 bytes)
9: --namespace (11 bytes)
10: cert-manager (12 bytes)
11: --values (8 bytes)
12: /var/folders/d4/_zh74d4n04n9yf9f2wqsl3640000gn/T/helmfile4052679194/cert-manager-cert-manager-values-c84f5d879 (110 bytes)
13: --reset-values (14 bytes)
14: --history-max (13 bytes)
15: 10 (2 bytes)
ERROR:
exit status 1
EXIT STATUS
1
STDERR:
Error: failed to create resource: namespaces "mgmt" not found
COMBINED OUTPUT:
Release "cert-manager" does not exist. Installing it now.
Error: failed to create resource: namespaces "mgmt" not found
Error
exit status 1