vexxhost / atmosphere

Simple & easy private cloud platform featuring VMs, Kubernetes & bare-metal
101 stars 28 forks source link

Support k8s 1.26 #463

Closed okozachenko1203 closed 1 year ago

okozachenko1203 commented 1 year ago

I got the following error with k8s 1.26.

TASK [vexxhost.atmosphere.percona_xtradb_cluster : Create Percona XtraDB cluster] ***
fatal: [ctl1]: FAILED! => {"changed": true, "duration": 600, "method": "create", "msg": "Resource creation timed out", "result": {"apiVersion": "pxc.percona.com/v1-10-0", "kind": "PerconaXtraDBCluster", "metadata": {"creationTimestamp": "2023-06-27T15:48:51Z", "generation": 1, "managedFields": [{"apiVersion": "pxc.percona.com/v1-10-0", "fieldsType": "FieldsV1", "fieldsV1": {"f:spec": {".": {}, "f:crVersion": {}, "f:haproxy": {".": {}, "f:enabled": {}, "f:image": {}, "f:nodeSelector": {".": {}, "f:openstack-control-plane": {}}, "f:size": {}}, "f:pxc": {".": {}, "f:autoRecovery": {}, "f:configuration": {}, "f:image": {}, "f:nodeSelector": {".": {}, "f:openstack-control-plane": {}}, "f:sidecars": {}, "f:size": {}, "f:volumeSpec": {".": {}, "f:persistentVolumeClaim": {".": {}, "f:resources": {".": {}, "f:requests": {".": {}, "f:storage": {}}}}}}, "f:secretsName": {}}}, "manager": "OpenAPI-Generator", "operation": "Update", "time": "2023-06-27T15:48:51Z"}, {"apiVersion": "pxc.percona.com/v1-10-0", "fieldsType": "FieldsV1", "fieldsV1": {"f:status": {".": {}, "f:backup": {}, "f:conditions": {}, "f:haproxy": {}, "f:logcollector": {}, "f:message": {}, "f:pmm": {}, "f:proxysql": {}, "f:pxc": {}, "f:ready": {}, "f:size": {}, "f:state": {}}}, "manager": "percona-xtradb-cluster-operator", "operation": "Update", "subresource": "status", "time": "2023-06-27T15:49:09Z"}], "name": "percona-xtradb", "namespace": "openstack", "resourceVersion": "785216", "uid": "121e8c3f-f745-406d-9631-28f54c19dd64"}, "spec": {"crVersion": "1.10.0", "haproxy": {"enabled": true, "image": "docker.io/percona/percona-xtradb-cluster-operator:1.10.0-haproxy", "nodeSelector": {"openstack-control-plane": "enabled"}, "size": 3}, "pxc": {"autoRecovery": true, "configuration": "[mysqld]\nmax_connections=8192\ninnodb_buffer_pool_size=4096M\nmax_allowed_packet=16M\n", "image": "docker.io/percona/percona-xtradb-cluster:5.7.39-31.61", "nodeSelector": {"openstack-control-plane": "enabled"}, "sidecars": [{"env": [{"name": "MONITOR_PASSWORD", "valueFrom": {"secretKeyRef": {"key": "monitor", "name": "percona-xtradb"}}}, {"name": "DATA_SOURCE_NAME", "value": "monitor:$(MONITOR_PASSWORD)@(localhost:3306)/"}], "image": "quay.io/prometheus/mysqld-exporter:v0.14.0", "livenessProbe": {"httpGet": {"path": "/", "port": "metrics"}}, "name": "exporter", "ports": [{"containerPort": 9104, "name": "metrics"}]}], "size": 3, "volumeSpec": {"persistentVolumeClaim": {"resources": {"requests": {"storage": "160Gi"}}}}}, "secretsName": "percona-xtradb"}, "status": {"backup": {}, "conditions": [{"lastTransitionTime": "2023-06-27T15:49:09Z", "message": "PodDisruptionBudget for percona-xtradb-pxc: reconcile pdb: get object: no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"", "reason": "ErrorReconcile", "status": "True", "type": "error"}], "haproxy": {}, "logcollector": {}, "message": ["Error: PodDisruptionBudget for percona-xtradb-pxc: reconcile pdb: get object: no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\""], "pmm": {}, "proxysql": {}, "pxc": {}, "ready": 0, "size": 0, "state": "error"}}}
mnaser commented 1 year ago

I think that's cause PodDisruptionBudget got ripped out and we need to update the version of the operator to handle it.

mnaser commented 1 year ago

This seems to have been fixed here: https://github.com/percona/percona-xtradb-cluster-operator/commit/b2f71dba8e31d4d26bb91f9ddd17224b16e1803d

mnaser commented 1 year ago

We should bump the operator to 1.12

okozachenko1203 commented 1 year ago

pxco 1.12 generates policy/v1 PDBs without a doubt for new clusters. But for existing ones, it doesn't upgrade automatically and just output the following warns in its log stream

W0705 12:32:57.828004       1 warnings.go:67] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget