Skip to content

Splunk Operator: Helm chart CRDs do not validate against JSON schema #1477

Open
@gblues

Description

@gblues

Please select the type of request

Bug

Tell us more

Describe the request
The CRDs for the helm chart contain a handful of errors that cause validation to fail.

Expected behavior
The CRDs should validate

Splunk setup on K8S
This is an issue with the YAML, not with splunk itself. This information is irrelevant.

Reproduction/Testing steps

# this requires the `kubeconform` tool
git clone https://github.com/splunk/splunk-operator
kubeconform -output json \
  -strict \
  -schema-location default \
  -schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
  -schema-location 'https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{.NormalizedKubernetesVersion}}/{{.ResourceKind}}.json' \
  splunk-operator/helm-chart/splunk-operator/crds/*.yaml

K8s environment
Irrelevant

Proposed changes(optional)
The problematic fields are as follows:

  • /metadata/creationTimestamp
  • /status/conditions
  • /status/storedVersions

None of these can be null. I was able to make the validator happy by deleting the first two and updating storedVersions to be an empty list instead of null

Additional context(optional)
We use kubeconform to ensure that all of our manifests conform to their respective schemas. In order to use the provided CRDs, we have to manually fix these CRDs every time we upgrade, which creates toil. It would be better if the CRDs we get in the chart were valid.

Metadata

Metadata

Assignees

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