-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery Selectors #797
Discovery Selectors #797
Conversation
Some things I know I still need to get the operator to do (UPDATE: this is done)
|
As of right now, I can confirm the following molecule tests pass (minus the server-side testing - mainly calls into the server's namespaces API):
Next up the server has to be refactored to move away from accessible_namespaces and go use discovery selectors. Once the server is ready, the following molecule tests then need to be tested (along with the ones above, since they were not testing server-side functionality at the time I got them to pass).
|
9aba634
to
6774b3f
Compare
Two more things added to this PR. First, when discovery selectors are defined AND cluster wide access is FALSE, the operator will set Note that if cluster_wide_access is True, the operator simply leaves the ConfigMap's discovery selectors to those complex set of selectors the user put in the Kiali CR. This is because Kiali is given permission to see any and all namespaces in the cluster, so if new namespaces are created and match those selectors, the Kiali Server will see them (assuming it queries for namespaces again using the selectors). There is no need to fix the Kiali Server on a set list of namespaces. This behavior is the same as the old Secondly, the operator will attempt to find the Istio ConfigMap (regardless of its name) in the istio control plane namespace. It will look at all ConfigMaps, and the first it finds that has "data.mesh" field, that will be used as the Istio ConfigMap. It will then look inside to see if there are any discoverySelectors for the operator to use. Note that the operator only ever looks for the Istio ConfigMap if there is no |
9eafc75
to
ed3c2c2
Compare
reminder to me to document the labels that the operator creates. things like |
aced14a
to
28f494e
Compare
28f494e
to
8b20169
Compare
c1612f5
to
9669cc1
Compare
975f736
to
391cd4a
Compare
Just documenting the labels and annotations that are used by the operator namespace label (created when the operator makes the namespace accessible to the kiali server):
remote cluster secret annotation (created by script that creates remote cluster secrets):
kiali deployment annotation (created/updated by the operator when it restarts the kiali server pod)
ossmconsole deployment annotation (created/updated by the operator when it restarts the ossmconsole server pod)
|
47e833c
to
ad7cdef
Compare
ad7cdef
to
47a4d28
Compare
I made a change - now that the server supports multiple "values" for a matchExpressions, I change the operator so it creates those instead of multiple matchLabels (makes reading the configmap easier and probably more efficient on the server side). Before, the operator was putting accessible namespaces in the discovery selectors within the ConfigMap like this: discovery_selectors:
default:
- matchLabels:
kubernetes.io/metadata.name: istio-system
- matchLabels:
kubernetes.io/metadata.name: my-namespace
- matchLabels:
kubernetes.io/metadata.name: my-second-namespace Now it will be: discovery_selectors:
default:
- matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- istio-system
- my-namespace
- my-second-namespace Molecule tests all pass after making this change:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change is fine by me, more efficient and easier to look at.
Implement the new discovery selector support in the operator.
part of: kiali/kiali#7546
part of KEP: https://github.com/kiali/kiali/blob/master/design/KEPS/namespace-discovery/proposal.md
server PR: kiali/kiali#7592
operator PR: #797
helm chart PR: kiali/helm-charts#274
docs PR: kiali/kiali.io#807