You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried using the --additional-schema-location to validate CRDs like HelmRelease or ServiceMonitor but I was unable to trigger an error by voluntarily misconfiguring one of those resource.
Expected Behavior
Setting a custom resource field type to something different than what is defined in the CRD schema should trigger an error when running kubeval against it.
Current Behavior
Running kubeval against a badly configured custom resource result in a PASS.
Steps to reproduce
Given the following badly configured resource bad-helmrelease.yaml:
apiVersion: helm.fluxcd.io/v1kind: HelmReleasemetadata:
name: demo-helmreleasenamespace: defaultspec:
releaseName: demo-helmreleasechart:
# repository key should be a string as defined in the crd schema. # Here I set it to a map instead to try to trigger an errorrepository:
name: http://example.comname: demo-helmreleaseversion: 1.0.0helmVersion: v3values: {}
"repository": {
"description": "RepoURL is the URL of the Helm repository, e.g. `https://kubernetes-charts.storage.googleapis.com` or `https://charts.example.com`.",
"type": "string"
},
Running kubeval against this resource result in the following output:
Hi, I tried using the
--additional-schema-location
to validate CRDs like HelmRelease or ServiceMonitor but I was unable to trigger an error by voluntarily misconfiguring one of those resource.Expected Behavior
Setting a custom resource field type to something different than what is defined in the CRD schema should trigger an error when running kubeval against it.
Current Behavior
Running kubeval against a badly configured custom resource result in a PASS.
Steps to reproduce
Given the following badly configured resource
bad-helmrelease.yaml
:Using the helmrelease CRD schema located at https://github.com/ams0/kubernetes-json-schema/blob/master/master-standalone/helmrelease-helm-v1.json where the repository key is defined as follow:
Running kubeval against this resource result in the following output:
The text was updated successfully, but these errors were encountered: