Skip to content

fix: correct imagePullSecrets schema to use LocalObjectReference format#93

Open
williamtrelawny wants to merge 1 commit into
mainfrom
fix/imagePullSecret-schema
Open

fix: correct imagePullSecrets schema to use LocalObjectReference format#93
williamtrelawny wants to merge 1 commit into
mainfrom
fix/imagePullSecret-schema

Conversation

@williamtrelawny
Copy link
Copy Markdown
Collaborator

@williamtrelawny williamtrelawny commented May 14, 2026

Summary

  • imagePullSecrets was defined in the schema as an array of strings, but Kubernetes requires []LocalObjectReference (objects with a name field)
  • This mismatch caused schema validation errors when using the correct K8s format, forcing users to pass --skip-schema-validation
  • Fixes global.imagePullSecrets, graylog.image.imagePullSecrets, and datanode.image.imagePullSecrets

Closes #84

Usage after fix

# values.yaml
global:
  imagePullSecrets:
    - name: my-pull-secret
# --set flag
--set global.imagePullSecrets[0].name=my-pull-secret

Reviewer validation steps

1. Confirm correct format passes schema validation:

helm lint charts/graylog --set-json 'global.imagePullSecrets=[{"name":"my-pull-secret"}]'
# Expected: no schema validation errors

2. Confirm plain string format is now rejected:

helm lint charts/graylog --set-json 'global.imagePullSecrets=["my-pull-secret"]'
# Expected: schema validation error

3. Confirm the pod spec renders correctly:

helm template charts/graylog --set-json 'global.imagePullSecrets=[{"name":"my-pull-secret"}]' \
  | grep -A5 'imagePullSecrets'
# Expected output in both StatefulSets:
#   imagePullSecrets:
#     - name: my-pull-secret

4. Confirm per-component override also works:

helm template charts/graylog \
  --set-json 'graylog.image.imagePullSecrets=[{"name":"graylog-secret"}]' \
  --set-json 'datanode.image.imagePullSecrets=[{"name":"datanode-secret"}]' \
  | grep -A5 'imagePullSecrets'
# Expected: each StatefulSet uses its own secret

Test plan

  • Helm schema validation passes with imagePullSecrets: [{name: my-pull-secret}]
  • Helm schema validation rejects imagePullSecrets: [my-pull-secret] (plain string)
  • Pod spec renders correctly with imagePullSecrets set for both graylog and datanode statefulsets

🤖 Generated with Claude Code

Schema declared imagePullSecrets as array of strings, but Kubernetes
requires array of LocalObjectReference objects ({name: string}).
Fixes schema for global, graylog.image, and datanode.image.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Values file imagePullSecrets format is invalid for the Graylog Helm chart

1 participant