-
Notifications
You must be signed in to change notification settings - Fork 25
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
Avoid deploying the operator with default label #701
Conversation
Any operator that is built with the operator-sdk framework will have default selector labels added for the operator like this: control-plane: controller-manager When the operator is deployed in the same namespace as other operator, that also continue using the default label, then the service object for the operator fails to work. It will route webhook requests to the wrong pod. This change is to use the following label instead: control-plane: verticadb-operator I also took the opportunity to rename the operator objects. The deployment object was renamed from verticadb-operator-controller-manager to verticadb-operator-manager.
We changed the serviceAccount for pods with the new 2.0.2 operator. So, some operator upgrade tests can fail due to a caching issue. The statefulset was updated, but the sts controller was still trying to use the old serviceaccount. I could have fixed this by increasing the timeout of the test, but I opted to delete the sts to avoid the cache issue.
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.
Looks good!
@@ -15,7 +15,7 @@ apiVersion: v1 | |||
kind: Pod | |||
metadata: | |||
labels: | |||
control-plane: controller-manager | |||
control-plane: matt |
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.
Is this on purpose?
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.
Actulally it is. With the change of the control-plane label, it can now be templated in the helm chart. So, in this testcase, which sets the nameOverride
parameter, the label will be set to the value of that parameter.
Any operator that is built with the operator-sdk framework will have default selector labels added for the operator like this:
When the operator is deployed in the same namespace as other operator, that also continue using the default label, then the service object for the operator fails to work. The service object is used by the webhook, so it will route webhook requests to the wrong pod.
This change is to use the following label instead:
I also took the opportunity to rename the operator objects. The deployment object was renamed from
verticadb-operator-controller-manager
toverticadb-operator-manager
.Closes #694