monokle icon indicating copy to clipboard operation
monokle copied to clipboard

Compare namespaces in Compare & Sync

Open olensmar opened this issue 2 years ago • 1 comments

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

olensmar avatar Jun 27 '22 10:06 olensmar

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.

devcatalin avatar Jul 11 '22 11:07 devcatalin

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)

julioramosest avatar Oct 31 '22 09:10 julioramosest

image

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"

chargio avatar Feb 20 '23 18:02 chargio