-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat : Operator Installation outside of targetNamespace #2589
base: main
Are you sure you want to change the base?
Conversation
98cb58b
to
56d4773
Compare
from change #2589: |
1f928d0
to
e3fd824
Compare
from change #2589: |
33278d6
to
26570f7
Compare
from change #2589: |
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.
Initial set of comments
fad4dfa
to
822dfe9
Compare
2ba0ff8
to
475f7b6
Compare
|
||
csvNamespace := csv.Namespace | ||
operatorNamespace := csv.Annotations["olm.operatorNamespace"] | ||
targetNamespaces := operator.TargetNamespaces |
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.
Maybe I'm wrong but, to me, "tenant app namespaces" are the ones declared in certsuite_config.yaml (field targetNamespaces), not the operator.TargetNamespaces (which comes from operatorGroup.spec.targetNamespaces).
So isn't it good enough just checking whether the operator installation namespace (operator.Csv.Annotations["olm.operatorNamespace"]) is in the certsuite_config.yaml's "targetNamespaces" field?
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.
As per the requirement, the tenant dedicated operator namespace is mentioned by the namespace where CR is allowed to be created. In any case, we are not considering any other namespace other than the config file specified namespaces for our testing. But the check on targetNamespace is better to be done in the operator specific way (generic), instead of going back to our configuration.
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.
The requirement for this test is:
Operators are not permitted to be installed into a tenant app namespace. Operators that are installed with the "Single Namespace" olm install mode must be installed into the tenants dedicated operator namespace. Upstream 3rd party operators will be installed Globally with "All Namespaces" olm install mode into the openshift-operators namespace.
In my understanding, the idea of this test is to make sure that tenants dedicate a special namespace for installing operator(s) and that it is not shared with other CNF application namespaces. So I would expect the dedicated operator namespace to be part of the certsuite_config.yaml's "targetNamespaces" filed as @greyerof mentioned, since this hold the namespaces under test. Also, this reserved namespace should only be holding resources deployed/owned by the operator. So if non-operator pods are found in a namespace containing operator pods/resources, the test should fail.
Refers the issue