koki / short

Manageable Kubernetes manifests through a composable, reusable syntax
https://docs.koki.io/short
Apache License 2.0
122 stars 14 forks source link

Volume Without VolumeSource error message #93

Closed wlan0 closed 6 years ago

wlan0 commented 6 years ago
wlan0@wlan0:~/code/go/src/github.com/koki/short/testdata/pods$ ../../bin/short -f pod_spec_with_volume_multiple.yaml 
Use flag '--verbose-errors' for more detailed error info.
Error: (*types.PodWrapper) value: couldn't serialize as yaml
wlan0@wlan0:~/code/go/src/github.com/koki/short/testdata/pods$ cat pod_spec_with_volume_multiple.yaml 
apiVersion: v1
kind: Pod
metadata:
  name: meta_test
  labels:
    app: meta_test
  annotations:
    meta: _test 
  namespace: test
  clusterName: test_cluster
spec:
  volumes:
  - name: empty_test_volume
  - name: host_path_test_volume
    hostPath:
      path: /path/to/host/vol
      type: Directory
  - name: empty_dir_test_volume
    emptyDir:
      medium: Memory
      sizeLimit: 100m
  - name: gce_pd_test_volume
    gcePersistentDisk:
      pdName: gce_pd_test_volume
      fsType: ext4
      partition: 1
      readOnly: true
ublubu commented 6 years ago

fixed by the recent volumes PRs. current error message:

Error: converting pod_spec_with_volume_multiple.yaml: pod volumes: volume (empty_test_volume): v1.Volume: empty volume definition