Skip to content

extraManifests.kind breaks ArgoCD unless capitalized #248

@barsilver

Description

@barsilver

Hi,

When using the provided values_full.yaml from the examples folder with ArgoCD, I encountered this error:

InvalidSpecError: Unable to generate manifests in .: 
rpc error: code = FailedPrecondition desc = Failed to unmarshal "n8n_values.yaml": 
failed to unmarshal manifest: error unmarshaling JSON: 
while decoding JSON: Object 'Kind' is missing in '{"extraManifests":[{"apiVersion":"postgresql.cnpg.io/v1","kind":"Cluster","metadata":{"name":"db"},"spec":{"instances":1,"bootstrap":{"initdb":{"database":"n8n","owner":"n8n"}},"postgresql":{"parameters":{"shared_buffers":"64MB"}},"resources":{"requests":{"memory":"512Mi"},"limits":{"memory":"512Mi"}},"storage":{"size":"1Gi"}}}]}'

After some testing, I discovered that ArgoCD fails to parse the extraManifests section unless the kind field is capitalized (Kind instead of kind).
For example:

extraManifests:
  - apiVersion: postgresql.cnpg.io/v1
    Kind: Cluster   # <-- works
    metadata:
      name: db
    spec:
      instances: 1
      bootstrap:
        initdb:
          database: n8n
          owner: n8n
      postgresql:
        parameters:
          shared_buffers: "64MB"
      resources:
        requests:
          memory: "512Mi"
        limits:
          memory: "512Mi"
      storage:
        size: 1Gi

With the lowercase kind: cluster, ArgoCD throws the error above.
Interestingly, this does not happen with helm template. helm template works fine even with the lowercase kind.


Expected behavior:
The example values_full.yaml should work out of the box with ArgoCD, without requiring manual capitalization fixes.


Environment:

Helm version: v3.18.4

ArgoCD version: 8.3.7

Kubernetes version: 1.31

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions