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

cluster scoped custom resources (and definitions) are not watched

Open adietish opened this issue 5 years ago • 0 comments

Followup on #72

The tooling wont receive any events for cluster scoped CRDs and CRs. It only works if you are cluster admin. This was confirmed by @jeffmaury in commet https://github.com/redhat-developer/intellij-kubernetes/pull/82#pullrequestreview-470260334. He also confirmed that vscode has the same issue.

Steps:

  1. ASSERT: have some kubernetes cluster (ex. minikube) running and make sure that you're logged into it in kubectl
  2. EXEC:
kubectl apply -f - <<EOF apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: cars.openshift.pub
spec:
  group: openshift.pub
  names:
    kind: Car
    listKind: CarList
    plural: cars
    singular: car
  scope: Cluster
  subresources:
    status: {}
  version: v1
EOF
  1. EXEC:
kubectl apply -f - <<EOF apiVersion: openshift.pub/v1
kind: Car
metadata:
  name: alfa
spec:
  date_of_manufacturing: "2016-07-01T00:00:00Z"
  engine: CQ123456
EOF
  1. EXEC: open up the plugin in intellij
  2. ASSERT: both the cars CRD and the alfa CR are displayed
  3. EXEC: kubectl delete cars.openshift.pub
  4. ASSERT: both, the CRD and the CR, should disappear in the tree

Result: Both, the CRD cars.openshift.pub and the CR alfa, are not removed from the tree.

adietish avatar Aug 18 '20 13:08 adietish