monokle
monokle copied to clipboard
Compare namespaces in Compare & Sync
For scenarios where I have different environments in different namespaces in the same (or different) clusters - for example staging and production - I would like to be able to compare two namespaces in the same cluster.
Currently the namespace filter applies to both selections in "Compare & sync" which makes this impossible
Related comment from discord:
I just noticed than when used in conjunction with Kustomize, if we declare the namespace in the kustomization, it prevents us from using the diff feature. I ended up using "implicit" default namespace to fully use the compare feature, between K preview and cluster or between K overlays previews.
I guess the obvious choice was to "step down" the namesapce dropdown from top bar to column header? decision would be if to do this permanently or dynamically (only when the user chooses some type left or right that opens that scenario - then upper selector disappears on goes inactive, and 2nd level namespaces dropdown appears left and right)
![image](https://user-images.githubusercontent.com/7500590/220179257-3d7c80fb-607d-4875-8960-8f7708a157b1.png)
In cluster mode, and in other filters, the filter selection is currently applicable to both comparisons (left and right). If I want to compare one namespace with another:
- I need to be able to select a different cluster in the left selection and a different one in the right selection
- I need to apply filters to the left selection (namespace / labels / annotations)
- I need to apply filters to the right selection (namespace / labels / annotations)
- I want to be able to apply those filters independently.
- I don't want to see events in my selection (they are not objects I can compare)
Once I've had selected the objects I want to compare, the selection itself is no longer relevant:
- The cluster is not important, I am comparing equivalent objects in two different clusters, so the cluster should not be used to differentiate one object from another
- The namespace / labels / annotation used are not a differentiation. For instance, if I select the label "app: monokle-dev" and in the other cluster I select "app: monokle-prod", the label is no longer consider to differentiate objects
- The same happens with namespaces, once I've selected the namespace, it does not differentiate objects inside. A "deployment/frontend" in monokle-dev would be "monokle-dev/deployment/frontend", and it should be compared with "monokle-prod/deployment/frontend"