percona-xtradb-cluster-operator
percona-xtradb-cluster-operator copied to clipboard
K8SPXC-1301: Run operator locally
CHANGE DESCRIPTION
Problem: The operator should be able to run on a local machine against a deployed K8S cluster.
The solution introduces two env vars:
OPERATOR_NAMESPACE - namespace in which the operator is running. If not present, the operator will read it from /var/run/secrets/kubernetes.io/serviceaccount/namespace
DISABLE_WEBHOOK - used only when the operator runs locally. This is needed since in order to set up the webhook we need the operator deployment object, but since we are running locally, that is not available.
This PR also fixes https://github.com/percona/percona-xtradb-cluster-operator/pull/1511
CHECKLIST
Jira
- [x] Is the Jira ticket created and referenced properly?
- [x] Does the Jira ticket have the proper statuses for documentation (
Needs Doc) and QA (Needs QA)? - [x] Does the Jira ticket link to the proper milestone (Fix Version field)?
Tests
- [x] Is an E2E test/test case added for the new feature/change?
- [x] Are unit tests added where appropriate?
- [x] Are OpenShift compare files changed for E2E tests (
compare/*-oc.yml)?
Config/Logging/Testability
- [x] Are all needed new/changed options added to default YAML files?
- [x] Are the manifests (crd/bundle) regenerated if needed?
- [x] Did we add proper logging messages for operator actions?
- [x] Did we ensure compatibility with the previous version or cluster upgrade process?
- [x] Does the change support oldest and newest supported PXC version?
- [x] Does the change support oldest and newest supported Kubernetes version?
@inelpandzic please fix conflicts and check tests
| Test name | Status |
|---|---|
| affinity-8-0 | passed |
| auto-tuning-8-0 | passed |
| cross-site-8-0 | failure |
| demand-backup-cloud-8-0 | passed |
| demand-backup-encrypted-with-tls-8-0 | passed |
| demand-backup-8-0 | passed |
| haproxy-5-7 | passed |
| haproxy-8-0 | passed |
| init-deploy-5-7 | passed |
| init-deploy-8-0 | passed |
| limits-8-0 | passed |
| monitoring-2-0-8-0 | passed |
| one-pod-5-7 | failure |
| one-pod-8-0 | failure |
| pitr-8-0 | passed |
| pitr-gap-errors-8-0 | passed |
| proxy-protocol-8-0 | failure |
| proxysql-sidecar-res-limits-8-0 | passed |
| recreate-8-0 | passed |
| restore-to-encrypted-cluster-8-0 | passed |
| scaling-proxysql-8-0 | passed |
| scaling-8-0 | passed |
| scheduled-backup-5-7 | passed |
| scheduled-backup-8-0 | passed |
| security-context-8-0 | passed |
| smart-update1-8-0 | failure |
| smart-update2-8-0 | passed |
| storage-8-0 | passed |
| tls-issue-cert-manager-ref-8-0 | passed |
| tls-issue-cert-manager-8-0 | failure |
| tls-issue-self-8-0 | passed |
| upgrade-consistency-8-0 | passed |
| upgrade-haproxy-8-0 | passed |
| upgrade-proxysql-8-0 | failure |
| users-5-7 | passed |
| users-8-0 | failure |
| validation-hook-8-0 | passed |
| We run 37 out of 37 |
commit: https://github.com/percona/percona-xtradb-cluster-operator/pull/1522/commits/1ed4605b677654d7ec76c0662b204abb3cbe9a67
image: perconalab/percona-xtradb-cluster-operator:PR-1522-1ed4605b