intellij-kubernetes
intellij-kubernetes copied to clipboard
cluster scoped custom resources (and definitions) are not watched
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:
- ASSERT: have some kubernetes cluster (ex. minikube) running and make sure that you're logged into it in kubectl
- 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
- 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
- EXEC: open up the plugin in intellij
- ASSERT: both the cars CRD and the alfa CR are displayed
- EXEC:
kubectl delete cars.openshift.pub - 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.