Remove unwanted functionality added by the operator sdk
Follow-up to discussion in #10 (comment 3381823)
we could remove the code from main.go that needs all the permissions that we don't want to grant.
Actually we need to remove that code ASAP. Currently in a 2-pod deployment, the config-operator works in only one pod, the other reports:
{"level":"info","ts":1587481779.3996916,"logger":"leader","msg":"Trying to become the leader."}
{"level":"info","ts":1587481782.456127,"logger":"leader","msg":"Found existing lock","LockOwner":"webeos-deployment-4-lgzqb"}
{"level":"info","ts":1587481782.521362,"logger":"leader","msg":"Not the leader. Waiting."}
{"level":"info","ts":1587481783.746612,"logger":"leader","msg":"Not the leader. Waiting."}
{"level":"info","ts":1587481786.2349427,"logger":"leader","msg":"Not the leader. Waiting."}
And does nothing. This leader election means only one instance will ever do any actual work (by design, the SDk does this so that only one operator actively processes CRs in a HA setup)
But we need to remove this leader election so each config-operator instance (in each webeos pod) works in parallel with the other instances.
Take the opportunity to remove the monitoring part as well, then we can reduce the permissions for the webeos serviceAccount as per webeos-deployment#12 (closed)
CC @estevesm