kubeval icon indicating copy to clipboard operation
kubeval copied to clipboard

Insufficied validation for `volumeMounts`

Open vbence opened this issue 3 years ago • 0 comments

Using kubeval --strict still passes malformed StatefulSet (volumeMount item containing emptyDir key).

Helm install will fail with the following error:

ValidationError(StatefulSet.spec.template.spec.containers[1].volumeMounts[5]): missing required field "mountPath" in io.k8s.api.core.v1.VolumeMount]

Simplified example:

apiVersion: apps/v1
kind: StatefulSet
spec:
  template:
    spec:
      containers:
        volumeMounts:
        - name: socket
          emptyDir: {}
        - name: log-buffer
          emptyDir: {}

vbence avatar Sep 02 '20 10:09 vbence