intellij-kubernetes
intellij-kubernetes copied to clipboard
Editor: error "unmarshall(...) must not be null" when editing invalid PVCs and PVs
Steps:
- EXEC: create a file with the following content:
---
# --------------------------
# PVC 1: Uses matchLabels
# --------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-labels
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
selector:
matchLabels:
pvc-target: labels # Direct label match
---
# --------------------------
# PVC 2: Uses matchExpressions
# --------------------------
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-expressions
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
selector:
matchExpressions:
- key: environment
operator: In # Value must be in the list
values: [production, staging]
- key: region
operator: Exists # Key must exist (value ignored)
Result:
Editor reports invalid k8s yaml. The error details are telling nothing about what's wrong with it: unmarshall(...) must not be null