Search code examples
kubernetesairflowkubernetes-helm

Additional property is not allowed in Helm chart


Since I added some additonal initContainers to my Airflow helm chart (link), I was trying to set a default initContainerResources to my helm values and deployment yaml:

  • values.yaml
# Airflow scheduler settings
scheduler:
  
  initContainerResources:
    resources: 
     limits:
      cpu: 200m
      memory: 255Mi
     requests:
      cpu: 100m
      memory: 128Mi

  • .. and deployment.yaml
...
        - name: scheduler-add-init1
          securityContext:
            allowPrivilegeEscalation: False
          resources:
{{ toYaml .Values.scheduler.initContainerResources.resources | indent 12 }}
...

However, when I try to render the files with helm template, I get:

Error: values don't meet the specifications of the schema(s) in the following chart(s): airflow:

  • scheduler: Additional property initContainerResources is not allowed

My goal was to define the init containers resources together but independent from the scheduler container. What´s wrong with my setup?


Solution

  • Turned out I had the schema validation process blocking me from adding additional parameters. Just added the desired key to the schema and it worked:

    values.schema.json

                    "initContainerResources": {
                        "description": "Add default ressources to all init containers of scheduler.",
                        "type": "object",
                        "default": "See values.yaml"
                    },