intellij-kubernetes icon indicating copy to clipboard operation
intellij-kubernetes copied to clipboard

Editor: error "unmarshall(...) must not be null" when editing invalid PVCs and PVs

Open adietish opened this issue 7 months ago • 0 comments

Steps:

  1. 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

Image

adietish avatar Mar 11 '25 10:03 adietish