-
Notifications
You must be signed in to change notification settings - Fork 345
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
Changed the operator to gracefully degrade when not on cluster-wide scope #916
Changed the operator to gracefully degrade when not on cluster-wide scope #916
Conversation
55f19d0
to
83f3dda
Compare
4708af1
to
42cae85
Compare
e3d9307
to
af1d9c6
Compare
Codecov Report
@@ Coverage Diff @@
## master #916 +/- ##
==========================================
- Coverage 64.04% 64.01% -0.03%
==========================================
Files 79 79
Lines 6427 6423 -4
==========================================
- Hits 4116 4112 -4
Misses 2173 2173
Partials 138 138
Continue to review full report at Codecov.
|
I'm marking this as WIP, as I want to confirm whether the |
Testing this, I found out something interesting that I kinda mentioned on #791 / #830 but wasn't able to find definitive documentation about it: the WATCH_NAMESPACE can be a comma-separated list of values: Excerpt: apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: jaeger-operator
namespace: other-observability
spec:
template:
metadata:
annotations:
olm.operatorGroup: other-observability-ntvzv
olm.operatorNamespace: other-observability
olm.targetNamespaces: observability,other-observability
spec:
containers:
- args:
- start
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.annotations['olm.targetNamespaces'] I couldn't find a way to do it via the web interface, but I can provision an operator via OLM's UI and then later manually change the operator group ( apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
olm.providedAPIs: Jaeger.v1.jaegertracing.io
creationTimestamp: "2020-02-20T16:27:24Z"
generateName: other-observability-
generation: 2
name: other-observability-ntvzv
namespace: other-observability
resourceVersion: "129022"
selfLink: /apis/operators.coreos.com/v1/namespaces/other-observability/operatorgroups/other-observability-ntvzv
uid: a05ae72f-e405-4728-b01c-45deb2387e9a
spec:
targetNamespaces:
- other-observability
- observability
status:
lastUpdated: "2020-02-20T16:29:23Z"
namespaces:
- other-observability
- observability |
Wanted to record another finding here: OLM will create a new I also tried to create an operator with a regular user, but looks like not all ordinary users can even list operators. I need to do some more research on this part. |
7d1729d
to
f6abd51
Compare
do you mean in #916 (comment)? I would be interested to know the motivation behind this PR. There might be two user bases. The OpenShift user base using the OLM might not care much about the permission as it seems OLM is using the |
Yes, that's the one I meant.
#791 is an example of this second case, but there's a third as well: corporations that are using OpenShift+OLM but are hesitant in using operators that require cluster-wide permissions. |
6d8eb73
to
50b3621
Compare
This is now ready for the next review. |
@jpkrohling Would it be possible to summarise the implications of this PR, e.g. in the context of the CR used by Service Mesh with oauth proxy config for Kiali? |
There should be no changes to consumers of the operator via OLM, as it will install the cluster roles as well. A separate CSV could be provided without the cluster permissions, but it's not part of this PR. There are also no changes to the CR, everything that worked before should work now. |
95afa1c
to
1166d78
Compare
…cope Signed-off-by: Juraci Paixão Kröhling <[email protected]>
1166d78
to
b1d31e1
Compare
Merged, as both @objectiser and @pavolloffay were OK, with restrictions only around the CI passing (it did) and docs (jaegertracing/documentation#370) |
This is a first draft in getting the operator to work in a single namespace, without cluster roles. This supersedes #830 and fixes #791. It also fixes #905.
This PR also includes instrumentation of the reconciliation for deployments and namespaces, as I added them in order to better understand what needed fixing.
Signed-off-by: Juraci Paixão Kröhling [email protected]