diff --git a/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127-oc.yml index 7ea643c37d..82583bc780 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127-oc.yml @@ -256,6 +256,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127.yml b/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127.yml index fb5964e087..f65e9a22d4 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-proxysql-k127.yml @@ -257,6 +257,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-proxysql-oc.yml b/e2e-tests/affinity/compare/statefulset_custom-proxysql-oc.yml index d5dda98aa1..edd9ae3f0b 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-proxysql-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-proxysql-oc.yml @@ -253,6 +253,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-proxysql.yml b/e2e-tests/affinity/compare/statefulset_custom-proxysql.yml index 0f33361813..06a2b5526d 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-proxysql.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-proxysql.yml @@ -246,6 +246,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-pxc-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_custom-pxc-k127-oc.yml index 1aa62f3899..027f357e07 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-pxc-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-pxc-k127-oc.yml @@ -243,6 +243,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-pxc-k127.yml b/e2e-tests/affinity/compare/statefulset_custom-pxc-k127.yml index 2855c93b5f..27467e0a86 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-pxc-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-pxc-k127.yml @@ -244,6 +244,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-pxc-oc.yml b/e2e-tests/affinity/compare/statefulset_custom-pxc-oc.yml index 78d16e37bb..c5848e00ff 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-pxc-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-pxc-oc.yml @@ -240,6 +240,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_custom-pxc.yml b/e2e-tests/affinity/compare/statefulset_custom-pxc.yml index 505fdc0b53..14c1caf215 100644 --- a/e2e-tests/affinity/compare/statefulset_custom-pxc.yml +++ b/e2e-tests/affinity/compare/statefulset_custom-pxc.yml @@ -241,6 +241,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: custom + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127-oc.yml index a9c28ee74b..81716575e0 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127-oc.yml @@ -229,6 +229,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127.yml b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127.yml index 735e32f94b..142e0ef19a 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-k127.yml @@ -230,6 +230,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-oc.yml b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-oc.yml index 1bb7192f73..f7c38a3d28 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-proxysql-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-proxysql-oc.yml @@ -226,6 +226,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-proxysql.yml b/e2e-tests/affinity/compare/statefulset_hostname-proxysql.yml index 366cba8d82..bdc5b0ee18 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-proxysql.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-proxysql.yml @@ -219,6 +219,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127-oc.yml index 05209c19de..57e54e0902 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127-oc.yml @@ -216,6 +216,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127.yml b/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127.yml index b582d93c80..5a1314fb7f 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-pxc-k127.yml @@ -217,6 +217,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-pxc-oc.yml b/e2e-tests/affinity/compare/statefulset_hostname-pxc-oc.yml index 1dd752c13b..15546e409b 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-pxc-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-pxc-oc.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_hostname-pxc.yml b/e2e-tests/affinity/compare/statefulset_hostname-pxc.yml index 51918c51f6..b926356303 100644 --- a/e2e-tests/affinity/compare/statefulset_hostname-pxc.yml +++ b/e2e-tests/affinity/compare/statefulset_hostname-pxc.yml @@ -214,6 +214,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: hostname + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-proxysql-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_region-proxysql-k127-oc.yml index 5f6b218ef1..5359861947 100644 --- a/e2e-tests/affinity/compare/statefulset_region-proxysql-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_region-proxysql-k127-oc.yml @@ -229,6 +229,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-proxysql-k127.yml b/e2e-tests/affinity/compare/statefulset_region-proxysql-k127.yml index 78f1f04baa..38d2392137 100644 --- a/e2e-tests/affinity/compare/statefulset_region-proxysql-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_region-proxysql-k127.yml @@ -230,6 +230,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-proxysql-oc.yml b/e2e-tests/affinity/compare/statefulset_region-proxysql-oc.yml index 703a188009..8e52eec66f 100644 --- a/e2e-tests/affinity/compare/statefulset_region-proxysql-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_region-proxysql-oc.yml @@ -226,6 +226,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-proxysql.yml b/e2e-tests/affinity/compare/statefulset_region-proxysql.yml index 20d0252f2c..f1f4c84d0d 100644 --- a/e2e-tests/affinity/compare/statefulset_region-proxysql.yml +++ b/e2e-tests/affinity/compare/statefulset_region-proxysql.yml @@ -219,6 +219,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-pxc-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_region-pxc-k127-oc.yml index 716b032abd..82403ab36f 100644 --- a/e2e-tests/affinity/compare/statefulset_region-pxc-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_region-pxc-k127-oc.yml @@ -216,6 +216,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-pxc-k127.yml b/e2e-tests/affinity/compare/statefulset_region-pxc-k127.yml index 806b13af6a..d0a7939b90 100644 --- a/e2e-tests/affinity/compare/statefulset_region-pxc-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_region-pxc-k127.yml @@ -217,6 +217,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-pxc-oc.yml b/e2e-tests/affinity/compare/statefulset_region-pxc-oc.yml index 3f73067513..9a6022dc1a 100644 --- a/e2e-tests/affinity/compare/statefulset_region-pxc-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_region-pxc-oc.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_region-pxc.yml b/e2e-tests/affinity/compare/statefulset_region-pxc.yml index 771afc5fe7..a5685b0b9f 100644 --- a/e2e-tests/affinity/compare/statefulset_region-pxc.yml +++ b/e2e-tests/affinity/compare/statefulset_region-pxc.yml @@ -214,6 +214,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: region + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127-oc.yml index a8f64b5acd..4a60875f35 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127-oc.yml @@ -229,6 +229,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127.yml b/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127.yml index eb6d968770..d47d77edf3 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-proxysql-k127.yml @@ -230,6 +230,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-proxysql-oc.yml b/e2e-tests/affinity/compare/statefulset_zone-proxysql-oc.yml index d17b20a7f7..628bcfd043 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-proxysql-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-proxysql-oc.yml @@ -226,6 +226,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-proxysql.yml b/e2e-tests/affinity/compare/statefulset_zone-proxysql.yml index 0fc96cbd0e..31784e3fb4 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-proxysql.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-proxysql.yml @@ -219,6 +219,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-pxc-k127-oc.yml b/e2e-tests/affinity/compare/statefulset_zone-pxc-k127-oc.yml index 8eb828b3eb..ae3992153b 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-pxc-k127-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-pxc-k127-oc.yml @@ -216,6 +216,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-pxc-k127.yml b/e2e-tests/affinity/compare/statefulset_zone-pxc-k127.yml index c486fc1506..329fb84064 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-pxc-k127.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-pxc-k127.yml @@ -217,6 +217,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-pxc-oc.yml b/e2e-tests/affinity/compare/statefulset_zone-pxc-oc.yml index ab6e8eed09..f88cf74008 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-pxc-oc.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-pxc-oc.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/affinity/compare/statefulset_zone-pxc.yml b/e2e-tests/affinity/compare/statefulset_zone-pxc.yml index 6e6bdde7f4..f5f63aa9d4 100644 --- a/e2e-tests/affinity/compare/statefulset_zone-pxc.yml +++ b/e2e-tests/affinity/compare/statefulset_zone-pxc.yml @@ -214,6 +214,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: zone + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/service_cluster1-haproxy-k122.yml b/e2e-tests/default-cr/compare/service_cluster1-haproxy-k122.yml index 84566f4195..262370c853 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-haproxy-k122.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-haproxy-k122.yml @@ -34,6 +34,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas-k122.yml b/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas-k122.yml index d5476e667d..5401651a29 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas-k122.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas-k122.yml @@ -22,6 +22,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas.yml b/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas.yml index 5ddb439aaa..244e99c53e 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-haproxy-replicas.yml @@ -21,6 +21,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-haproxy.yml b/e2e-tests/default-cr/compare/service_cluster1-haproxy.yml index 5d0c398c1b..8e3937772c 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-haproxy.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-haproxy.yml @@ -33,6 +33,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-pxc-k122.yml b/e2e-tests/default-cr/compare/service_cluster1-pxc-k122.yml index 2f31063d15..6ed8327c4e 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-pxc-k122.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-pxc-k122.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-pxc-unready-k122.yml b/e2e-tests/default-cr/compare/service_cluster1-pxc-unready-k122.yml index 7a2fce2cb8..35e5d628a7 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-pxc-unready-k122.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-pxc-unready-k122.yml @@ -31,6 +31,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-pxc-unready.yml b/e2e-tests/default-cr/compare/service_cluster1-pxc-unready.yml index c46c69392c..f10a08d489 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-pxc-unready.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-pxc-unready.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_cluster1-pxc.yml b/e2e-tests/default-cr/compare/service_cluster1-pxc.yml index dbc2f27331..05249bbdd4 100644 --- a/e2e-tests/default-cr/compare/service_cluster1-pxc.yml +++ b/e2e-tests/default-cr/compare/service_cluster1-pxc.yml @@ -29,6 +29,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-k122.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-k122.yml index 6a0216ab8e..a89cd1446f 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-k122.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-k122.yml @@ -34,6 +34,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas-k122.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas-k122.yml index 1d0cd43f70..160a4d0175 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas-k122.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas-k122.yml @@ -22,6 +22,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas.yml index fc355d0e63..494b1a40ba 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy-replicas.yml @@ -21,6 +21,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy.yml index 9ae56c9065..1b72280a87 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-haproxy.yml @@ -33,6 +33,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-k122.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-k122.yml index d4dae9fbfd..7506f96855 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-k122.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-k122.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready-k122.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready-k122.yml index 4f4eb7780e..8e83db8d9b 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready-k122.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready-k122.yml @@ -31,6 +31,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready.yml index 7efda88b40..a708aff5af 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc-unready.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc.yml b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc.yml index 04037aa9ea..e30e0779ec 100644 --- a/e2e-tests/default-cr/compare/service_minimal-cluster-pxc.yml +++ b/e2e-tests/default-cr/compare/service_minimal-cluster-pxc.yml @@ -29,6 +29,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127-oc.yml b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127-oc.yml index 7bd48b03f2..496c7fc18c 100644 --- a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127-oc.yml +++ b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127-oc.yml @@ -264,6 +264,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127.yml b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127.yml index f826937dcf..b3fce211bc 100644 --- a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127.yml +++ b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-k127.yml @@ -265,6 +265,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-oc.yml b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-oc.yml index b31a0fb970..6c190bbc17 100644 --- a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-oc.yml +++ b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc-oc.yml @@ -261,6 +261,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc.yml b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc.yml index 17da5d4ff8..f20e40b492 100644 --- a/e2e-tests/default-cr/compare/statefulset_cluster1-pxc.yml +++ b/e2e-tests/default-cr/compare/statefulset_cluster1-pxc.yml @@ -262,6 +262,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: cluster1 + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127-oc.yml b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127-oc.yml index dac4daced4..5b53bece81 100644 --- a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127-oc.yml +++ b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127-oc.yml @@ -257,6 +257,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127.yml b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127.yml index ca58aeb73f..56c18742ad 100644 --- a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127.yml +++ b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-k127.yml @@ -258,6 +258,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-oc.yml b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-oc.yml index 981f025b8b..f3bd83466d 100644 --- a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-oc.yml +++ b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc-oc.yml @@ -254,6 +254,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc.yml b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc.yml index c171311bec..9158a3a925 100644 --- a/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc.yml +++ b/e2e-tests/default-cr/compare/statefulset_minimal-cluster-pxc.yml @@ -255,6 +255,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: minimal-cluster + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127-oc.yml index 031d3f7a46..24e054f75c 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127.yml index 9c8cdd2a7d..42fe1b3728 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k127.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129-oc.yml index c61520ba21..a17efdfc1d 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129.yml index 26f7d6ac09..dd2f43e258 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-oc.yml index 031d3f7a46..24e054f75c 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud.yml index 9c8cdd2a7d..42fe1b3728 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-azure-demand-backup-cloud.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud name: restore-job-on-demand-backup-azure-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-azure-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-azure-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127-oc.yml index 50a92a3e7b..cc939435d0 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127.yml index 937041ff10..3ebbb5a316 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k127.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129-oc.yml index c91f9d89f6..60b4f46693 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129.yml index b0a9519b71..4f1cb9ef22 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-oc.yml index 50a92a3e7b..cc939435d0 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud.yml index 937041ff10..3ebbb5a316 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_restore-job-on-demand-backup-s3-demand-backup-cloud.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud name: restore-job-on-demand-backup-s3-demand-backup-cloud ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-s3-demand-backup-cloud + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-s3-demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129-oc.yml index cbbd8debeb..ef355f25a1 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-aws-s3 ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129.yml index 6541e5c37f..3d5d799e0f 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-k129.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-aws-s3 ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-oc.yml index d21a8733cd..7e8d1519a4 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-aws-s3 ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3.yml index 2bb5fcfde0..b3912fb7f5 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-aws-s3.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-aws-s3 ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-aws-s3 - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-aws-s3 - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-aws-s3 + percona.com/backup-name: on-demand-backup-aws-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129-oc.yml index 85768a203f..50410af149 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-azure-blob ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129.yml index 6844cb0fbd..3b825e5cd9 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-k129.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-azure-blob ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-oc.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-oc.yml index 448e60c8de..a69d10f3ce 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-oc.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-azure-blob ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob.yml b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob.yml index c562b41e72..0cae1d42d3 100644 --- a/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob.yml +++ b/e2e-tests/demand-backup-cloud/compare/job.batch_xb-on-demand-backup-azure-blob.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud name: xb-on-demand-backup-azure-blob ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud suspend: false template: metadata: labels: - backup-name: on-demand-backup-azure-blob - cluster: demand-backup-cloud - job-name: xb-on-demand-backup-azure-blob - type: xtrabackup + app.kubernetes.io/instance: demand-backup-cloud + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-azure-blob + percona.com/backup-name: on-demand-backup-azure-blob + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup-cloud spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127-oc.yml index 8e5714955e..a5f958978a 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127.yml index 8bbd644bf4..5f2e5651fd 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k127.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129-oc.yml index 8c3096a31d..e4b6157d7d 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129.yml index 1b5d4dc78b..eb020931a8 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-oc.yml index 8e5714955e..a5f958978a 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup.yml index 8bbd644bf4..5f2e5651fd 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-minio-demand-backup.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup name: restore-job-on-demand-backup-minio-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-minio-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-minio-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129-oc.yml index 01a59b8a67..ff2ef4cc71 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup name: restore-job-on-demand-backup-pvc-bsource-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129.yml index 5f19b15f84..4de01729e9 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup name: restore-job-on-demand-backup-pvc-bsource-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-oc.yml index e7dcd28823..eb7db6c410 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup name: restore-job-on-demand-backup-pvc-bsource-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup.yml index d3143a263d..fed8469a9e 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-bsource-demand-backup.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup name: restore-job-on-demand-backup-pvc-bsource-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-bsource-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129-oc.yml index 10fbd82a56..1712d97c63 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup name: restore-job-on-demand-backup-pvc-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129.yml index 7e7284cd5e..b6c332de53 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup name: restore-job-on-demand-backup-pvc-demand-backup ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-oc.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-oc.yml index 634f8687f1..a98099354f 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-oc.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup-oc.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup name: restore-job-on-demand-backup-pvc-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup.yml b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup.yml index 2c21d5c383..d219894096 100644 --- a/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup.yml +++ b/e2e-tests/demand-backup/compare/job_restore-job-on-demand-backup-pvc-demand-backup.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup name: restore-job-on-demand-backup-pvc-demand-backup ownerReferences: - controller: true @@ -20,7 +24,11 @@ spec: template: metadata: labels: - job-name: restore-job-on-demand-backup-pvc-demand-backup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-on-demand-backup-pvc-demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129-oc.yml b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129-oc.yml index 7bf7a3ed96..3771b30a6c 100644 --- a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129-oc.yml +++ b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup name: xb-on-demand-backup-minio ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup suspend: false template: metadata: labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129.yml b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129.yml index 44bfa14733..8d566802c3 100644 --- a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129.yml +++ b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-k129.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup name: xb-on-demand-backup-minio ownerReferences: - controller: true @@ -21,18 +25,26 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup suspend: false template: metadata: labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-oc.yml b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-oc.yml index b871bec756..88f5af37bd 100644 --- a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-oc.yml +++ b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio-oc.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup name: xb-on-demand-backup-minio ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup suspend: false template: metadata: labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio.yml b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio.yml index bb5b5bcd4f..6cb45eba97 100644 --- a/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio.yml +++ b/e2e-tests/demand-backup/compare/job_xb-on-demand-backup-minio.yml @@ -3,10 +3,14 @@ kind: Job metadata: generation: 1 labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup name: xb-on-demand-backup-minio ownerReferences: - controller: true @@ -20,18 +24,26 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup suspend: false template: metadata: labels: - backup-name: on-demand-backup-minio - cluster: demand-backup - job-name: xb-on-demand-backup-minio - type: xtrabackup + app.kubernetes.io/instance: demand-backup + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-minio + percona.com/backup-name: on-demand-backup-minio + percona.com/backup-type: xtrabackup + percona.com/cluster: demand-backup spec: containers: - command: diff --git a/e2e-tests/demand-backup/run b/e2e-tests/demand-backup/run index 72b99347d0..30d99f5f0b 100755 --- a/e2e-tests/demand-backup/run +++ b/e2e-tests/demand-backup/run @@ -48,7 +48,7 @@ main() { exit 1 fi - backup_job_name=$(kubectl get pod -l job-name=xb-on-demand-backup-minio -o jsonpath='{.items[].metadata.name}') + backup_job_name=$(kubectl get pod -l "percona.com/backup-job-name=xb-on-demand-backup-minio" -o jsonpath='{.items[].metadata.name}') kubectl logs "$backup_job_name" | egrep "xbcloud put --storage=s3 --parallel=[0-9]+ --md5 --insecure (--curl-retriable-errors=7 )?--parallel=2 --curl-retriable-errors=8" kubectl logs "$backup_job_name" | grep "xbstream -x -C /tmp --parallel=2" @@ -60,7 +60,7 @@ main() { run_recovery_check "$cluster" "on-demand-backup-minio" compare_kubectl job/restore-job-on-demand-backup-minio-demand-backup - restore_job_name=$(kubectl get pod -l job-name=restore-job-on-demand-backup-minio-demand-backup -o jsonpath='{.items[].metadata.name}') + restore_job_name=$(kubectl get pod -l "percona.com/restore-job-name=restore-job-on-demand-backup-minio-demand-backup" -o jsonpath='{.items[].metadata.name}') kubectl logs "$restore_job_name" | grep "xtrabackup --defaults-group=mysqld --datadir=/datadir --move-back --parallel=3" kubectl logs "$restore_job_name" | grep "xtrabackup --use-memory=1500000000 --prepare --parallel=3" kubectl logs "$restore_job_name" | egrep "xbcloud get --parallel=[0-9]+ --insecure (--curl-retriable-errors=7 )?--parallel=3" diff --git a/e2e-tests/functions b/e2e-tests/functions index 9f2415e4c8..72bf29c79d 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -446,11 +446,13 @@ compare_kubectl() { del(.metadata.annotations."kubernetes.io/psp") | del(.metadata.annotations."batch.kubernetes.io/job-tracking") | del(.metadata.labels."batch.kubernetes.io/job-name") | + del(.metadata.labels."job-name") | del(.metadata.annotations."cloud.google.com/neg") | del(.metadata.annotations."k8s.v1.cni.cncf.io*") | del(.metadata.annotations."k8s.ovn.org/pod-networks") | del(.spec.template.metadata.annotations."last-applied-secret") | del(.spec.template.metadata.labels."batch.kubernetes.io/job-name") | + del(.spec.template.metadata.labels."job-name") | del(.. | select(has("batch.kubernetes.io/controller-uid"))."batch.kubernetes.io/controller-uid") | del(.. | select(has("image")).image) | del(.. | select(has("clusterIP")).clusterIP) | diff --git a/e2e-tests/haproxy/compare/pdb_haproxy-haproxy.yml b/e2e-tests/haproxy/compare/pdb_haproxy-haproxy.yml index 8ef929f8af..4d2bc05714 100644 --- a/e2e-tests/haproxy/compare/pdb_haproxy-haproxy.yml +++ b/e2e-tests/haproxy/compare/pdb_haproxy-haproxy.yml @@ -2,6 +2,12 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: generation: 1 + labels: + app.kubernetes.io/component: haproxy + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: haproxy-haproxy ownerReferences: - controller: true diff --git a/e2e-tests/haproxy/compare/service_haproxy-haproxy-k122.yml b/e2e-tests/haproxy/compare/service_haproxy-haproxy-k122.yml index 5da65efe90..1a8da1b31d 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-haproxy-k122.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-haproxy-k122.yml @@ -34,6 +34,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas-k122.yml b/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas-k122.yml index 31ee28437f..c5435322b1 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas-k122.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas-k122.yml @@ -22,6 +22,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas.yml b/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas.yml index 02221ebf8a..9848b038cd 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-haproxy-replicas.yml @@ -21,6 +21,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/service_haproxy-haproxy.yml b/e2e-tests/haproxy/compare/service_haproxy-haproxy.yml index 2aaeb8a415..14bf863552 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-haproxy.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-haproxy.yml @@ -33,6 +33,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/service_haproxy-proxysql-k122.yml b/e2e-tests/haproxy/compare/service_haproxy-proxysql-k122.yml index 81842240a2..502c2da6b1 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-proxysql-k122.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-proxysql-k122.yml @@ -26,6 +26,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/service_haproxy-proxysql.yml b/e2e-tests/haproxy/compare/service_haproxy-proxysql.yml index 5f88d2726c..f53c1f2104 100644 --- a/e2e-tests/haproxy/compare/service_haproxy-proxysql.yml +++ b/e2e-tests/haproxy/compare/service_haproxy-proxysql.yml @@ -25,6 +25,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127-oc.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127-oc.yml index 9968b97f0c..ed536fae82 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127-oc.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127-oc.yml @@ -255,6 +255,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127.yml index 9538f6993c..a422ac3dc5 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-k127.yml @@ -256,6 +256,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-oc.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-oc.yml index af3c8d968b..2aa27e0fe3 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-oc.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-oc.yml @@ -252,6 +252,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127-oc.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127-oc.yml index 022f311d30..645a9eadb5 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127-oc.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127-oc.yml @@ -255,6 +255,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127.yml index f528ff310f..6d4f507c82 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-k127.yml @@ -256,6 +256,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-oc.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-oc.yml index 5d825239e9..e005b90aef 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-oc.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret-oc.yml @@ -252,6 +252,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret.yml index f04b3dfa4d..fd88e12cdc 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql-secret.yml @@ -253,6 +253,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql.yml b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql.yml index e98f906f89..d8c6b7170e 100644 --- a/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql.yml +++ b/e2e-tests/haproxy/compare/statefulset_haproxy-proxysql.yml @@ -253,6 +253,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: haproxy + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl-internal.yml b/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl-internal.yml index f65a6192a1..4516590ac7 100644 --- a/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl-internal.yml +++ b/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl-internal.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: generation: 1 + labels: + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: no-proxysql-ssl-internal spec: commonName: no-proxysql-pxc diff --git a/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl.yml b/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl.yml index ba567a26c1..990fcc811f 100644 --- a/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl.yml +++ b/e2e-tests/init-deploy/compare/certificate_no-proxysql-ssl.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: generation: 1 + labels: + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: no-proxysql-ssl spec: commonName: no-proxysql-proxysql diff --git a/e2e-tests/init-deploy/compare/configmap_no-proxysql-pxc.yml b/e2e-tests/init-deploy/compare/configmap_no-proxysql-pxc.yml index 7f38ea4cf9..5bd41145ea 100644 --- a/e2e-tests/init-deploy/compare/configmap_no-proxysql-pxc.yml +++ b/e2e-tests/init-deploy/compare/configmap_no-proxysql-pxc.yml @@ -8,6 +8,11 @@ data: wsrep_debug=1 kind: ConfigMap metadata: + labels: + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: no-proxysql-pxc ownerReferences: - controller: true diff --git a/e2e-tests/init-deploy/compare/issuer_no-proxysql-pxc-issuer.yml b/e2e-tests/init-deploy/compare/issuer_no-proxysql-pxc-issuer.yml index 5f697fea1d..5adcfb1255 100644 --- a/e2e-tests/init-deploy/compare/issuer_no-proxysql-pxc-issuer.yml +++ b/e2e-tests/init-deploy/compare/issuer_no-proxysql-pxc-issuer.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: generation: 1 + labels: + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: no-proxysql-pxc-issuer spec: ca: diff --git a/e2e-tests/init-deploy/compare/pdb_some-name-proxysql.yml b/e2e-tests/init-deploy/compare/pdb_some-name-proxysql.yml index 4be4a9f799..949f71eea6 100644 --- a/e2e-tests/init-deploy/compare/pdb_some-name-proxysql.yml +++ b/e2e-tests/init-deploy/compare/pdb_some-name-proxysql.yml @@ -2,6 +2,12 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: generation: 1 + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-proxysql ownerReferences: - controller: true diff --git a/e2e-tests/init-deploy/compare/pdb_some-name-pxc.yml b/e2e-tests/init-deploy/compare/pdb_some-name-pxc.yml index 99fb0ef2c2..545eec6faa 100644 --- a/e2e-tests/init-deploy/compare/pdb_some-name-pxc.yml +++ b/e2e-tests/init-deploy/compare/pdb_some-name-pxc.yml @@ -2,6 +2,12 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: generation: 1 + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-pxc ownerReferences: - controller: true diff --git a/e2e-tests/init-deploy/compare/service_no-proxysql-pxc.yml b/e2e-tests/init-deploy/compare/service_no-proxysql-pxc.yml index 3ece782adc..8ea4198817 100644 --- a/e2e-tests/init-deploy/compare/service_no-proxysql-pxc.yml +++ b/e2e-tests/init-deploy/compare/service_no-proxysql-pxc.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/init-deploy/compare/service_some-name-proxysql-unready.yml b/e2e-tests/init-deploy/compare/service_some-name-proxysql-unready.yml index cf24e43b00..ca6867c7e6 100644 --- a/e2e-tests/init-deploy/compare/service_some-name-proxysql-unready.yml +++ b/e2e-tests/init-deploy/compare/service_some-name-proxysql-unready.yml @@ -31,6 +31,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/init-deploy/compare/service_some-name-proxysql.yml b/e2e-tests/init-deploy/compare/service_some-name-proxysql.yml index f8230024bc..5b72198ae1 100644 --- a/e2e-tests/init-deploy/compare/service_some-name-proxysql.yml +++ b/e2e-tests/init-deploy/compare/service_some-name-proxysql.yml @@ -26,6 +26,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/init-deploy/compare/service_some-name-pxc.yml b/e2e-tests/init-deploy/compare/service_some-name-pxc.yml index 84b12b6a85..951a2e3f8a 100644 --- a/e2e-tests/init-deploy/compare/service_some-name-pxc.yml +++ b/e2e-tests/init-deploy/compare/service_some-name-pxc.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127-oc.yml b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127-oc.yml index 9f33b7ff15..a05767c52d 100644 --- a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127-oc.yml @@ -212,6 +212,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127.yml b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127.yml index 3bc5a836d0..7407a5fd7a 100644 --- a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127.yml +++ b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-k127.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-oc.yml b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-oc.yml index c81ce2f014..32e5c9b25e 100644 --- a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc-oc.yml @@ -209,6 +209,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc.yml b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc.yml index fea94ca43f..e1a3bc0d60 100644 --- a/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_no-proxysql-pxc.yml @@ -210,6 +210,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-proxysql + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127-oc.yml index eb6c7be0c7..024292505a 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127-oc.yml @@ -229,6 +229,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127.yml index e6b49d6831..da78673351 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-k127.yml @@ -230,6 +230,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-oc.yml index ad2e8669ec..4da2d40a50 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql-oc.yml @@ -226,6 +226,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql.yml index deb543cb92..7c5a23e194 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-proxysql.yml @@ -219,6 +219,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127-oc.yml index e929cf377e..6910beac9a 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127-oc.yml @@ -263,6 +263,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127.yml index 1449ca31f0..f8c7f90556 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-k127.yml @@ -264,6 +264,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-oc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-oc.yml index 38d055eb5c..f78a3d269c 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-oc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc-oc.yml @@ -260,6 +260,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc.yml b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc.yml index 3344cadf79..bd92694bb4 100644 --- a/e2e-tests/init-deploy/compare/statefulset_some-name-pxc.yml +++ b/e2e-tests/init-deploy/compare/statefulset_some-name-pxc.yml @@ -261,6 +261,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127-oc.yml index 8ac89535dc..18916a974c 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127-oc.yml @@ -349,6 +349,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127.yml index 7d34dfcfe7..1a02fdeb12 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-k127.yml @@ -350,6 +350,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-oc.yml index a034efc806..ae931b000a 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased-oc.yml @@ -346,6 +346,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased.yml index 0c3e97ba95..ec3f8e8afd 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-increased.yml @@ -339,6 +339,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127-oc.yml index e26c9598b6..c8f793071f 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127-oc.yml @@ -349,6 +349,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127.yml index eb8d96610b..88841f8dc3 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-k127.yml @@ -350,6 +350,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-oc.yml index 57999700e6..adb4a1094d 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql-oc.yml @@ -346,6 +346,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-proxysql.yml b/e2e-tests/limits/compare/statefulset_no-limits-proxysql.yml index c25104ae80..eb7da15d5b 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-proxysql.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-proxysql.yml @@ -339,6 +339,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127-oc.yml index c096b3037e..088f6aa687 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127-oc.yml @@ -331,6 +331,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127.yml index df52f8ecb3..52e3987576 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-k127.yml @@ -332,6 +332,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-oc.yml index ed5b963b25..b9e705433e 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased-oc.yml @@ -328,6 +328,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased.yml index 901bd4136c..49830bbe1a 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-increased.yml @@ -329,6 +329,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127-oc.yml index 5203a165df..d54f41e553 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127-oc.yml @@ -331,6 +331,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127.yml index e21c08250e..734100ec42 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-k127.yml @@ -332,6 +332,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc-oc.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc-oc.yml index 0a6fa5f1b1..af2052871f 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc-oc.yml @@ -328,6 +328,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-limits-pxc.yml b/e2e-tests/limits/compare/statefulset_no-limits-pxc.yml index 8936e8407b..5f1b3acc9d 100644 --- a/e2e-tests/limits/compare/statefulset_no-limits-pxc.yml +++ b/e2e-tests/limits/compare/statefulset_no-limits-pxc.yml @@ -329,6 +329,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127-oc.yml index 48d3318c8e..359146425a 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127-oc.yml @@ -212,6 +212,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127.yml index 4419228cf7..ddea4ee550 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-k127.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-oc.yml index 9a14a08c19..57ec2164a7 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased-oc.yml @@ -209,6 +209,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased.yml index 39c19959ab..4ca052dfb2 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-increased.yml @@ -202,6 +202,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127-oc.yml index 48d3318c8e..359146425a 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127-oc.yml @@ -212,6 +212,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127.yml index 4419228cf7..ddea4ee550 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-k127.yml @@ -213,6 +213,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-oc.yml index 9a14a08c19..57ec2164a7 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql-oc.yml @@ -209,6 +209,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql.yml index 39c19959ab..4ca052dfb2 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-proxysql.yml @@ -202,6 +202,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127-oc.yml index 8d42f59f2b..ab25999f6c 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127-oc.yml @@ -199,6 +199,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127.yml index a2daf1777a..05c6c775ed 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-k127.yml @@ -200,6 +200,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-oc.yml index 59934cc06c..a8db992c60 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased-oc.yml @@ -196,6 +196,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased.yml index 5fbaba1ca0..affb625094 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-increased.yml @@ -197,6 +197,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127-oc.yml index 8d42f59f2b..ab25999f6c 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127-oc.yml @@ -199,6 +199,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127.yml index a2daf1777a..05c6c775ed 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-k127.yml @@ -200,6 +200,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-oc.yml index 59934cc06c..a8db992c60 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc-oc.yml @@ -196,6 +196,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc.yml b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc.yml index 5fbaba1ca0..affb625094 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-no-limits-pxc.yml @@ -197,6 +197,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests-no-limits + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127-oc.yml index e8d5f40225..281711f8f3 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127-oc.yml @@ -215,6 +215,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127.yml index 282de368af..fd91b1506b 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-k127.yml @@ -216,6 +216,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-oc.yml index 1c348a516d..289c1c7f49 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased-oc.yml @@ -212,6 +212,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased.yml index 04de1a77af..c31ea0161b 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-increased.yml @@ -205,6 +205,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127-oc.yml index fba24f4c88..ac27cba2e9 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127-oc.yml @@ -215,6 +215,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127.yml index d643536aeb..40f65087b2 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-k127.yml @@ -216,6 +216,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-oc.yml index 2ca2a0da52..b09c1d89c5 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql-oc.yml @@ -212,6 +212,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-proxysql.yml b/e2e-tests/limits/compare/statefulset_no-requests-proxysql.yml index d081fef2f6..90274f58ec 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-proxysql.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-proxysql.yml @@ -205,6 +205,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127-oc.yml index cf96e019c8..805d144969 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127-oc.yml @@ -202,6 +202,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127.yml index 14a61fe241..28dadd0e1d 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-k127.yml @@ -203,6 +203,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-oc.yml index 609473b531..dff665d6fd 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased-oc.yml @@ -199,6 +199,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased.yml index 742bfaabba..2d0223e5bc 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-increased.yml @@ -200,6 +200,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127-oc.yml index b947f3c164..3be6536ace 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127-oc.yml @@ -202,6 +202,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127.yml index 214d0a49b9..4d81b7835f 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-k127.yml @@ -203,6 +203,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc-oc.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc-oc.yml index 9d0c2bb9f9..d754c8d4f0 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc-oc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc-oc.yml @@ -199,6 +199,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/limits/compare/statefulset_no-requests-pxc.yml b/e2e-tests/limits/compare/statefulset_no-requests-pxc.yml index c29ce0947c..286c6711fb 100644 --- a/e2e-tests/limits/compare/statefulset_no-requests-pxc.yml +++ b/e2e-tests/limits/compare/statefulset_no-requests-pxc.yml @@ -200,6 +200,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: no-requests + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-no-prefix-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-no-prefix-oc.yml index 88927ea524..9cab316d65 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-no-prefix-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-no-prefix-oc.yml @@ -338,6 +338,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-oc.yml index ee4db078e2..e8b455d2c8 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127-oc.yml @@ -338,6 +338,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127.yml index 828af4fd02..954f2abdc2 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-k127.yml @@ -339,6 +339,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127-oc.yml index 88927ea524..9cab316d65 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127-oc.yml @@ -338,6 +338,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127.yml index 83e7740b2e..343283c10d 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-k127.yml @@ -339,6 +339,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-oc.yml index 919b5f6578..13093e1fe4 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix-oc.yml @@ -335,6 +335,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix.yml index 6cd12ab3f4..f71ded7599 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-no-prefix.yml @@ -336,6 +336,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-oc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-oc.yml index 1fb62e8d5b..42cbe53b8e 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-oc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc-oc.yml @@ -335,6 +335,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc.yml b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc.yml index 11a4046909..3c77b30617 100644 --- a/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc.yml +++ b/e2e-tests/monitoring-2-0/compare/statefulset_monitoring-pxc.yml @@ -336,6 +336,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: monitoring + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127-oc.yml index 923b854f69..a7381646f1 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127-oc.yml @@ -210,6 +210,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127.yml index daee571149..b3499f83dc 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-k127.yml @@ -211,6 +211,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-oc.yml index df3aef4d16..daefc5d368 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-oc.yml @@ -207,6 +207,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127-oc.yml index 556f7de7a5..9751ddae73 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127-oc.yml @@ -210,6 +210,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127.yml index 5f157034ea..35111eaa4c 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-k127.yml @@ -211,6 +211,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-oc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-oc.yml index 895c7f20ce..cfc2b0773a 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-oc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret-oc.yml @@ -207,6 +207,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret.yml index 21958bd52f..34358f540b 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc-secret.yml @@ -208,6 +208,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc.yml b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc.yml index 547168812f..70d387553d 100644 --- a/e2e-tests/one-pod/compare/statefulset_one-pod-pxc.yml +++ b/e2e-tests/one-pod/compare/statefulset_one-pod-pxc.yml @@ -208,6 +208,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: one-pod + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-k122.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-k122.yml index 7143640f8d..c251fe8a84 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-k122.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-k122.yml @@ -38,6 +38,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: LoadBalancer diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas-k122.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas-k122.yml index 9e447dc9ef..45a05042e5 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas-k122.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas-k122.yml @@ -22,6 +22,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas.yml index c634360cfa..d6193d720d 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy-replicas.yml @@ -21,6 +21,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy.yml index e383be0b19..435a9ffcb3 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-haproxy.yml @@ -36,6 +36,8 @@ spec: selector: app.kubernetes.io/component: haproxy app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: LoadBalancer diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-k122.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-k122.yml index 5deee96ee2..6503187317 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-k122.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-k122.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-unready.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-unready.yml index 80673e9b78..6d26a62557 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-unready.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc-unready.yml @@ -31,6 +31,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc.yml b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc.yml index 6ce8cdd7ee..6a508c3ab8 100644 --- a/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc.yml +++ b/e2e-tests/proxy-protocol/compare/service_proxy-protocol-pxc.yml @@ -29,6 +29,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127-oc.yml b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127-oc.yml index 411cd5df1c..013ec46d53 100644 --- a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127-oc.yml +++ b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127-oc.yml @@ -203,6 +203,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127.yml b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127.yml index 6c4deae555..02cb9292df 100644 --- a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127.yml +++ b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-k127.yml @@ -204,6 +204,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-oc.yml b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-oc.yml index 8ad528f2d6..3184d24faf 100644 --- a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-oc.yml +++ b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc-oc.yml @@ -200,6 +200,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc.yml b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc.yml index ae984e07b1..56108f6d91 100644 --- a/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc.yml +++ b/e2e-tests/proxy-protocol/compare/statefulset_proxy-protocol-pxc.yml @@ -201,6 +201,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: proxy-protocol + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql-k122.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql-k122.yml index f7466bfe10..519b8c7c11 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql-k122.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql-k122.yml @@ -28,6 +28,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: LoadBalancer diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql.yml index 6ef45b1353..a58a60036c 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/service_side-car-proxysql.yml @@ -26,6 +26,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: LoadBalancer diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127-oc.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127-oc.yml index 73a4abd613..626de80318 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127-oc.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127-oc.yml @@ -227,6 +227,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127.yml index cbe4f4e0cb..bc6d2a89db 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-k127.yml @@ -228,6 +228,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-oc.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-oc.yml index 373d45ccd4..2225dbfe3b 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-oc.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql-oc.yml @@ -224,6 +224,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql.yml b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql.yml index 90e5413d86..1c6b8385a8 100644 --- a/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql.yml +++ b/e2e-tests/proxysql-sidecar-res-limits/compare/statefulset_side-car-proxysql.yml @@ -217,6 +217,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: side-car + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k127.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k127.yml index 444b2c8977..d4f6962390 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k127.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k127.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context name: restore-job-restore-pvc-sec-context ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k129.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k129.yml index e3409e3578..2ba2a6dfe5 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k129.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context name: restore-job-restore-pvc-sec-context ownerReferences: - controller: true @@ -24,7 +28,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context.yml index 444b2c8977..d4f6962390 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-pvc-sec-context.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context name: restore-job-restore-pvc-sec-context ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-pvc-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k127.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k127.yml index b6967b7370..521e2e5c0c 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k127.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k127.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context name: restore-job-restore-s3-sec-context ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k129.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k129.yml index 899591048b..a73344aa8c 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k129.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context-k129.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context name: restore-job-restore-s3-sec-context ownerReferences: - controller: true @@ -24,7 +28,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context.yml b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context.yml index b6967b7370..521e2e5c0c 100644 --- a/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context.yml +++ b/e2e-tests/security-context/compare/job.batch_restore-job-restore-s3-sec-context.yml @@ -3,7 +3,11 @@ kind: Job metadata: generation: 1 labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context name: restore-job-restore-s3-sec-context ownerReferences: - controller: true @@ -22,7 +26,11 @@ spec: annotations: openshift.io/scc: privileged labels: - job-name: restore-job-restore-s3-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-job-name: restore-job-restore-s3-sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc-k129.yml b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc-k129.yml index c19b503ee5..2eac706928 100644 --- a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc-k129.yml +++ b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc-k129.yml @@ -5,10 +5,14 @@ metadata: openshift.io/scc: privileged generation: 1 labels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context name: xb-on-demand-backup-pvc ownerReferences: - controller: true @@ -23,20 +27,28 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context suspend: false template: metadata: annotations: openshift.io/scc: privileged labels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc.yml b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc.yml index 940cfe85ac..0e34009696 100644 --- a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc.yml +++ b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-pvc.yml @@ -5,10 +5,14 @@ metadata: openshift.io/scc: privileged generation: 1 labels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context name: xb-on-demand-backup-pvc ownerReferences: - controller: true @@ -22,20 +26,28 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context suspend: false template: metadata: annotations: openshift.io/scc: privileged labels: - backup-name: on-demand-backup-pvc - cluster: sec-context - job-name: xb-on-demand-backup-pvc - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-pvc + percona.com/backup-name: on-demand-backup-pvc + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context spec: containers: - command: diff --git a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3-k129.yml b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3-k129.yml index 730fcba539..ae9a4c4d0e 100644 --- a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3-k129.yml +++ b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3-k129.yml @@ -5,10 +5,14 @@ metadata: openshift.io/scc: privileged generation: 1 labels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context name: xb-on-demand-backup-s3 ownerReferences: - controller: true @@ -23,20 +27,28 @@ spec: podReplacementPolicy: TerminatingOrFailed selector: matchLabels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context suspend: false template: metadata: annotations: openshift.io/scc: privileged labels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context spec: containers: - command: @@ -117,10 +129,14 @@ spec: topologySpreadConstraints: - labelSelector: matchLabels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway diff --git a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3.yml b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3.yml index 86f291e931..edeacd71f1 100644 --- a/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3.yml +++ b/e2e-tests/security-context/compare/job.batch_xb-on-demand-backup-s3.yml @@ -5,10 +5,14 @@ metadata: openshift.io/scc: privileged generation: 1 labels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context name: xb-on-demand-backup-s3 ownerReferences: - controller: true @@ -22,20 +26,28 @@ spec: parallelism: 1 selector: matchLabels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context suspend: false template: metadata: annotations: openshift.io/scc: privileged labels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context spec: containers: - command: @@ -116,10 +128,14 @@ spec: topologySpreadConstraints: - labelSelector: matchLabels: - backup-name: on-demand-backup-s3 - cluster: sec-context - job-name: xb-on-demand-backup-s3 - type: xtrabackup + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/backup-job-name: xb-on-demand-backup-s3 + percona.com/backup-name: on-demand-backup-s3 + percona.com/backup-type: xtrabackup + percona.com/cluster: sec-context maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: ScheduleAnyway diff --git a/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context-oc.yml b/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context-oc.yml index f794041b4a..589ac59252 100644 --- a/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context-oc.yml +++ b/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context-oc.yml @@ -4,7 +4,11 @@ metadata: annotations: openshift.io/scc: privileged labels: - name: restore-src-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-svc-name: restore-src-restore-pvc-sec-context name: restore-src-restore-pvc-sec-context ownerReferences: - controller: true diff --git a/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context.yml b/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context.yml index 52b8204712..c0c46d3328 100644 --- a/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context.yml +++ b/e2e-tests/security-context/compare/pod_restore-src-restore-pvc-sec-context.yml @@ -4,7 +4,11 @@ metadata: annotations: openshift.io/scc: privileged labels: - name: restore-src-restore-pvc-sec-context + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster + percona.com/restore-svc-name: restore-src-restore-pvc-sec-context name: restore-src-restore-pvc-sec-context ownerReferences: - controller: true diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-k127.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-k127.yml index ce999e196d..0d9ae745da 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-k127.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-k127.yml @@ -234,6 +234,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-oc.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-oc.yml index 258ce223fb..d4f5c84c4c 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-oc.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes-oc.yml @@ -231,6 +231,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes.yml index a4980df84c..39c6df2635 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-changes.yml @@ -223,6 +223,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-k127.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-k127.yml index 221410acf3..3ff6b9b4c6 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-k127.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-k127.yml @@ -221,6 +221,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-oc.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-oc.yml index 1c761aa154..5a7aac1b6b 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-oc.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql-oc.yml @@ -218,6 +218,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql.yml b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql.yml index 148cc77d00..36decd4138 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-proxysql.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-proxysql.yml @@ -210,6 +210,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: proxydata spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes-k127.yml b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes-k127.yml index 0ee87d99f2..fb3998f9a4 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes-k127.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes-k127.yml @@ -235,6 +235,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes.yml b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes.yml index b7e6d1e4ae..aaae7e1960 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-changes.yml @@ -232,6 +232,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-k127.yml b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-k127.yml index b157e16081..901488f0d4 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-pxc-k127.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-pxc-k127.yml @@ -222,6 +222,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/security-context/compare/statefulset_sec-context-pxc.yml b/e2e-tests/security-context/compare/statefulset_sec-context-pxc.yml index 4dd37af60b..76b63172fd 100644 --- a/e2e-tests/security-context/compare/statefulset_sec-context-pxc.yml +++ b/e2e-tests/security-context/compare/statefulset_sec-context-pxc.yml @@ -219,6 +219,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: sec-context + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: datadir spec: accessModes: diff --git a/e2e-tests/tls-issue-cert-manager-ref/compare/certificate_some-name-tls-issueref-ssl.yml b/e2e-tests/tls-issue-cert-manager-ref/compare/certificate_some-name-tls-issueref-ssl.yml index bbaf3124d1..d9da8d6b78 100644 --- a/e2e-tests/tls-issue-cert-manager-ref/compare/certificate_some-name-tls-issueref-ssl.yml +++ b/e2e-tests/tls-issue-cert-manager-ref/compare/certificate_some-name-tls-issueref-ssl.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: generation: 1 + labels: + app.kubernetes.io/instance: some-name-tls-issueref + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-tls-issueref-ssl spec: commonName: some-name-tls-issueref-proxysql diff --git a/e2e-tests/tls-issue-cert-manager/compare/certificate_some-name-tls-issue-ssl.yml b/e2e-tests/tls-issue-cert-manager/compare/certificate_some-name-tls-issue-ssl.yml index 4f409bccd8..ca8b28c4ff 100644 --- a/e2e-tests/tls-issue-cert-manager/compare/certificate_some-name-tls-issue-ssl.yml +++ b/e2e-tests/tls-issue-cert-manager/compare/certificate_some-name-tls-issue-ssl.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: generation: 1 + labels: + app.kubernetes.io/instance: some-name-tls-issue + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-tls-issue-ssl spec: commonName: some-name-tls-issue-proxysql diff --git a/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-ca-issuer.yml b/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-ca-issuer.yml index e59fa131fd..e386937ef5 100644 --- a/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-ca-issuer.yml +++ b/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-ca-issuer.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: generation: 1 + labels: + app.kubernetes.io/instance: some-name-tls-issue + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-tls-issue-pxc-ca-issuer spec: selfSigned: {} diff --git a/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-issuer.yml b/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-issuer.yml index 745ae1263c..e66799455f 100644 --- a/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-issuer.yml +++ b/e2e-tests/tls-issue-cert-manager/compare/issuer_some-name-tls-issue-pxc-issuer.yml @@ -2,6 +2,11 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: generation: 1 + labels: + app.kubernetes.io/instance: some-name-tls-issue + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator + app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster name: some-name-tls-issue-pxc-issuer spec: ca: diff --git a/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1160.yml b/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1160.yml index f8230024bc..5b72198ae1 100644 --- a/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1160.yml +++ b/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1160.yml @@ -26,6 +26,8 @@ spec: selector: app.kubernetes.io/component: proxysql app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1160.yml b/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1160.yml index 84b12b6a85..951a2e3f8a 100644 --- a/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1160.yml +++ b/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1160.yml @@ -30,6 +30,8 @@ spec: selector: app.kubernetes.io/component: pxc app.kubernetes.io/instance: some-name + app.kubernetes.io/managed-by: percona-xtradb-cluster-operator app.kubernetes.io/name: percona-xtradb-cluster + app.kubernetes.io/part-of: percona-xtradb-cluster sessionAffinity: None type: ClusterIP diff --git a/pkg/controller/pxc/backup.go b/pkg/controller/pxc/backup.go index 1ef250b388..fa54c92a19 100644 --- a/pkg/controller/pxc/backup.go +++ b/pkg/controller/pxc/backup.go @@ -5,13 +5,7 @@ import ( "context" "crypto/sha1" "encoding/hex" - "fmt" - "hash/crc32" - "strconv" "strings" - "time" - - "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/pkg/errors" "github.com/robfig/cron/v3" @@ -25,6 +19,7 @@ import ( api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" "github.com/percona/percona-xtradb-cluster-operator/pkg/k8s" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/deployment" ) @@ -117,7 +112,7 @@ func (r *ReconcilePerconaXtraDBCluster) reconcileBackups(ctx context.Context, cr } if spec, ok := backups[item.Name]; ok { if spec.Keep > 0 { - oldjobs, err := r.oldScheduledBackups(cr, item.Name, spec.Keep) + oldjobs, err := r.oldScheduledBackups(ctx, cr, item.Name, spec.Keep) if err != nil { log.Error(err, "failed to list old backups", "name", item.Name) return true @@ -149,15 +144,15 @@ func backupJobClusterPrefix(clusterName string) string { } // oldScheduledBackups returns list of the most old pxc-bakups that execeed `keep` limit -func (r *ReconcilePerconaXtraDBCluster) oldScheduledBackups(cr *api.PerconaXtraDBCluster, ancestor string, keep int) ([]api.PerconaXtraDBClusterBackup, error) { +func (r *ReconcilePerconaXtraDBCluster) oldScheduledBackups(ctx context.Context, cr *api.PerconaXtraDBCluster, ancestor string, keep int) ([]api.PerconaXtraDBClusterBackup, error) { bcpList := api.PerconaXtraDBClusterBackupList{} - err := r.client.List(context.TODO(), + err := r.client.List(ctx, &bcpList, &client.ListOptions{ Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(map[string]string{ - "cluster": cr.Name, - "ancestor": ancestor, + naming.LabelPerconaClusterName: cr.Name, + naming.LabelPerconaBackupAncestorName: ancestor, }), }, ) @@ -219,12 +214,8 @@ func (r *ReconcilePerconaXtraDBCluster) createBackupJob(ctx context.Context, cr ObjectMeta: metav1.ObjectMeta{ Finalizers: fins, Namespace: cr.Namespace, - Name: generateBackupName(cr, backupJob.StorageName) + "-" + strconv.FormatUint(uint64(crc32.ChecksumIEEE([]byte(backupJob.Schedule))), 32)[:5], - Labels: map[string]string{ - "ancestor": backupJob.Name, - "cluster": cr.Name, - "type": "cron", - }, + Name: naming.ScheduledBackupName(cr.Name, backupJob.StorageName, backupJob.Schedule), + Labels: naming.LabelsScheduledBackup(cr, backupJob.Name), }, Spec: api.PXCBackupSpec{ PXCCluster: cr.Name, @@ -246,34 +237,6 @@ func (r *ReconcilePerconaXtraDBCluster) deleteBackupJob(name string) { r.crons.crons.Remove(job.(BackupScheduleJob).JobID) } -func generateBackupName(cr *api.PerconaXtraDBCluster, storageName string) string { - result := "cron-" - if len(cr.Name) > 16 { - result += cr.Name[:16] - } else { - result += cr.Name - } - result += "-" + trimNameRight(storageName, 16) + "-" - tnow := time.Now() - result += fmt.Sprintf("%d%d%d%d%d%d", tnow.Year(), tnow.Month(), tnow.Day(), tnow.Hour(), tnow.Minute(), tnow.Second()) - return result -} - -func trimNameRight(name string, ln int) string { - if len(name) <= ln { - ln = len(name) - } - - for ; ln > 0; ln-- { - if name[ln-1] >= 'a' && name[ln-1] <= 'z' || - name[ln-1] >= '0' && name[ln-1] <= '9' { - break - } - } - - return name[:ln] -} - // A minHeap is a min-heap of backup jobs. type minHeap []api.PerconaXtraDBClusterBackup diff --git a/pkg/controller/pxc/controller.go b/pkg/controller/pxc/controller.go index ef371a4173..60ea5206b7 100644 --- a/pkg/controller/pxc/controller.go +++ b/pkg/controller/pxc/controller.go @@ -568,7 +568,13 @@ func (r *ReconcilePerconaXtraDBCluster) deploy(ctx context.Context, cr *api.Perc if client.IgnoreNotFound(err) != nil { return errors.Wrap(err, "get current pxc sts") } - + // Keep same volumeClaimTemplates labels if statefulset already exists. + // We can't update volumeClaimTemplates. + if err == nil && cr.CompareVersionWith("1.16.0") >= 0 { + for i, pvc := range currentNodeSet.Spec.VolumeClaimTemplates { + nodeSet.Spec.VolumeClaimTemplates[i].Labels = pvc.Labels + } + } // TODO: code duplication with updatePod function if nodeSet.Spec.Template.Annotations == nil { nodeSet.Spec.Template.Annotations = make(map[string]string) @@ -683,20 +689,29 @@ func (r *ReconcilePerconaXtraDBCluster) deploy(ctx context.Context, cr *api.Perc haProxySet.Spec.Template.Annotations["percona.com/env-secret-config-hash"] = envVarsHash } } - err = r.client.Create(context.TODO(), haProxySet) - if err != nil && !k8serrors.IsAlreadyExists(err) { - return errors.Wrap(err, "create newStatefulSetHAProxy") - } - // PodDisruptionBudget object for HAProxy - err = r.client.Get(ctx, types.NamespacedName{Name: haProxySet.Name, Namespace: haProxySet.Namespace}, haProxySet) + currentHAProxySts := new(appsv1.StatefulSet) + err = r.client.Get(ctx, types.NamespacedName{Name: haProxySet.Name, Namespace: haProxySet.Namespace}, currentHAProxySts) + if client.IgnoreNotFound(err) != nil { + return errors.Wrap(err, "get HAProxy stateful set") + } if err == nil { - err := r.reconcilePDB(ctx, cr, cr.Spec.HAProxy.PodDisruptionBudget, sfsHAProxy, haProxySet) + err := r.reconcilePDB(ctx, cr, cr.Spec.HAProxy.PodDisruptionBudget, sfsHAProxy, currentHAProxySts) if err != nil { return errors.Wrapf(err, "PodDisruptionBudget for %s", haProxySet.Name) } - } else if !k8serrors.IsNotFound(err) { - return errors.Wrap(err, "get HAProxy stateful set") + // Keep same volumeClaimTemplates labels if statefulset already exists. + // We can't update volumeClaimTemplates. + if cr.CompareVersionWith("1.16.0") >= 0 { + for i, pvc := range currentHAProxySts.Spec.VolumeClaimTemplates { + haProxySet.Spec.VolumeClaimTemplates[i].Labels = pvc.Labels + } + } + } + + err = r.client.Create(context.TODO(), haProxySet) + if err != nil && !k8serrors.IsAlreadyExists(err) { + return errors.Wrap(err, "create newStatefulSetHAProxy") } } @@ -712,12 +727,19 @@ func (r *ReconcilePerconaXtraDBCluster) deploy(ctx context.Context, cr *api.Perc } currentProxySet := new(appsv1.StatefulSet) err = r.client.Get(context.TODO(), types.NamespacedName{ - Namespace: nodeSet.Namespace, - Name: nodeSet.Name, + Namespace: proxySet.Namespace, + Name: proxySet.Name, }, currentProxySet) if client.IgnoreNotFound(err) != nil { return errors.Wrap(err, "get current proxy sts") } + // Keep same volumeClaimTemplates labels if statefulset already exists. + // We can't update volumeClaimTemplates. + if err == nil && cr.CompareVersionWith("1.16.0") >= 0 { + for i, pvc := range currentProxySet.Spec.VolumeClaimTemplates { + proxySet.Spec.VolumeClaimTemplates[i].Labels = pvc.Labels + } + } // TODO: code duplication with updatePod function if proxySet.Spec.Template.Annotations == nil { @@ -936,7 +958,7 @@ func (r *ReconcilePerconaXtraDBCluster) reconcilePDB(ctx context.Context, cr *ap return nil } - pdb := pxc.PodDisruptionBudget(spec, sfs.Labels(), cr.Namespace) + pdb := pxc.PodDisruptionBudget(cr, spec, sfs.Labels()) err := setControllerReference(owner, pdb, r.scheme) if err != nil { return errors.Wrap(err, "set owner reference") diff --git a/pkg/controller/pxc/controller_test.go b/pkg/controller/pxc/controller_test.go index 12e94a4b34..66c91db839 100644 --- a/pkg/controller/pxc/controller_test.go +++ b/pkg/controller/pxc/controller_test.go @@ -316,7 +316,7 @@ var _ = Describe("Finalizer delete-proxysql-pvc", Ordered, func() { &client.ListOptions{ Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/component": "proxysql", + naming.LabelAppKubernetesComponent: "proxysql", }), }) return err == nil @@ -349,7 +349,7 @@ var _ = Describe("Finalizer delete-proxysql-pvc", Ordered, func() { err := k8sClient.List(ctx, &pvcList, &client.ListOptions{ Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/component": "proxysql", + naming.LabelAppKubernetesComponent: "proxysql", }), }) return err == nil @@ -474,7 +474,7 @@ var _ = Describe("Finalizer delete-pxc-pvc", Ordered, func() { &client.ListOptions{ Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/component": "pxc", + naming.LabelAppKubernetesComponent: "pxc", }), }) return err == nil @@ -507,7 +507,7 @@ var _ = Describe("Finalizer delete-pxc-pvc", Ordered, func() { err := k8sClient.List(ctx, &pvcList, &client.ListOptions{ Namespace: cr.Namespace, LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/component": "pxc", + naming.LabelAppKubernetesComponent: "pxc", }), }) return err == nil diff --git a/pkg/controller/pxc/replication.go b/pkg/controller/pxc/replication.go index 949c1ec91e..bb83bfed9d 100644 --- a/pkg/controller/pxc/replication.go +++ b/pkg/controller/pxc/replication.go @@ -16,6 +16,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/statefulset" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/queries" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" @@ -505,13 +506,9 @@ func NewExposedPXCService(svcName string, cr *api.PerconaXtraDBCluster) *corev1. Kind: "Service", }, ObjectMeta: metav1.ObjectMeta{ - Name: svcName, - Namespace: cr.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "external-service", - }, + Name: svcName, + Namespace: cr.Namespace, + Labels: naming.LabelsExternalService(cr), Annotations: cr.Spec.PXC.Expose.Annotations, }, Spec: corev1.ServiceSpec{ diff --git a/pkg/controller/pxc/secrets.go b/pkg/controller/pxc/secrets.go index 898d0467a9..50eac33c8e 100644 --- a/pkg/controller/pxc/secrets.go +++ b/pkg/controller/pxc/secrets.go @@ -17,6 +17,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" ) @@ -57,6 +58,7 @@ func (r *ReconcilePerconaXtraDBCluster) reconcileUsersSecret(ctx context.Context ObjectMeta: metav1.ObjectMeta{ Name: cr.Spec.SecretsName, Namespace: cr.Namespace, + Labels: naming.LabelsCluster(cr), }, Type: corev1.SecretTypeOpaque, } diff --git a/pkg/controller/pxc/tls.go b/pkg/controller/pxc/tls.go index 2ecb146d80..142a4139a2 100644 --- a/pkg/controller/pxc/tls.go +++ b/pkg/controller/pxc/tls.go @@ -5,16 +5,17 @@ import ( "fmt" "time" - "github.com/pkg/errors" - cm "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" - api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" - "github.com/percona/percona-xtradb-cluster-operator/pkg/pxctls" + "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + + api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" + "github.com/percona/percona-xtradb-cluster-operator/pkg/pxctls" ) func (r *ReconcilePerconaXtraDBCluster) reconcileSSL(cr *api.PerconaXtraDBCluster) error { @@ -72,7 +73,7 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLByCertManager(cr *api.PerconaXt issuerName = cr.Spec.TLS.IssuerConf.Name issuerGroup = cr.Spec.TLS.IssuerConf.Group } else { - if err := r.createIssuer(cr.Namespace, caIssuerName, ""); err != nil { + if err := r.createIssuer(cr, caIssuerName, ""); err != nil { return err } @@ -94,6 +95,9 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLByCertManager(cr *api.PerconaXt RenewBefore: &metav1.Duration{Duration: 730 * time.Hour}, }, } + if cr.CompareVersionWith("1.16.0") >= 0 { + caCert.Labels = naming.LabelsCluster(cr) + } err := r.client.Create(context.TODO(), caCert) if err != nil && !k8serr.IsAlreadyExists(err) { @@ -104,7 +108,7 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLByCertManager(cr *api.PerconaXt return err } - if err := r.createIssuer(cr.Namespace, issuerName, caCert.Spec.SecretName); err != nil { + if err := r.createIssuer(cr, issuerName, caCert.Spec.SecretName); err != nil { return err } } @@ -130,7 +134,9 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLByCertManager(cr *api.PerconaXt }, }, } - + if cr.CompareVersionWith("1.16.0") >= 0 { + kubeCert.Labels = naming.LabelsCluster(cr) + } if cr.Spec.TLS != nil && len(cr.Spec.TLS.SANs) > 0 { kubeCert.Spec.DNSNames = append(kubeCert.Spec.DNSNames, cr.Spec.TLS.SANs...) } @@ -172,6 +178,9 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLByCertManager(cr *api.PerconaXt if cr.Spec.TLS != nil && len(cr.Spec.TLS.SANs) > 0 { kubeCert.Spec.DNSNames = append(kubeCert.Spec.DNSNames, cr.Spec.TLS.SANs...) } + if cr.CompareVersionWith("1.16.0") >= 0 { + kubeCert.Labels = naming.LabelsCluster(cr) + } err = r.client.Create(context.TODO(), kubeCert) if err != nil && !k8serr.IsAlreadyExists(err) { return fmt.Errorf("create internal certificate: %v", err) @@ -210,7 +219,7 @@ func (r *ReconcilePerconaXtraDBCluster) waitForCerts(namespace string, secretsLi } } -func (r *ReconcilePerconaXtraDBCluster) createIssuer(namespace, issuer string, caCertSecret string) error { +func (r *ReconcilePerconaXtraDBCluster) createIssuer(cr *api.PerconaXtraDBCluster, issuer string, caCertSecret string) error { spec := cm.IssuerSpec{} if caCertSecret == "" { @@ -227,10 +236,15 @@ func (r *ReconcilePerconaXtraDBCluster) createIssuer(namespace, issuer string, c } } + var ls map[string]string + if cr.CompareVersionWith("1.16.0") >= 0 { + ls = naming.LabelsCluster(cr) + } err := r.client.Create(context.TODO(), &cm.Issuer{ ObjectMeta: metav1.ObjectMeta{ Name: issuer, - Namespace: namespace, + Namespace: cr.Namespace, + Labels: ls, }, Spec: spec, }) @@ -272,6 +286,9 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLManualy(cr *api.PerconaXtraDBCl Data: data, Type: corev1.SecretTypeTLS, } + if cr.CompareVersionWith("1.16.0") >= 0 { + secretObj.Labels = naming.LabelsCluster(cr) + } err = r.client.Create(context.TODO(), &secretObj) if err != nil && !k8serr.IsAlreadyExists(err) { return fmt.Errorf("create TLS secret: %v", err) @@ -305,6 +322,9 @@ func (r *ReconcilePerconaXtraDBCluster) createSSLManualy(cr *api.PerconaXtraDBCl Data: data, Type: corev1.SecretTypeTLS, } + if cr.CompareVersionWith("1.16.0") >= 0 { + secretObjInternal.Labels = naming.LabelsCluster(cr) + } err = r.client.Create(context.TODO(), &secretObjInternal) if err != nil && !k8serr.IsAlreadyExists(err) { return fmt.Errorf("create TLS internal secret: %v", err) diff --git a/pkg/controller/pxc/upgrade.go b/pkg/controller/pxc/upgrade.go index dc20d6eebc..85fcbc1702 100644 --- a/pkg/controller/pxc/upgrade.go +++ b/pkg/controller/pxc/upgrade.go @@ -22,9 +22,11 @@ import ( api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" "github.com/percona/percona-xtradb-cluster-operator/pkg/k8s" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/queries" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" + "github.com/percona/percona-xtradb-cluster-operator/pkg/util" ) func (r *ReconcilePerconaXtraDBCluster) updatePod(ctx context.Context, sfs api.StatefulApp, podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, newAnnotations map[string]string) error { @@ -95,23 +97,34 @@ func (r *ReconcilePerconaXtraDBCluster) updatePod(ctx context.Context, sfs api.S } err = k8sretry.RetryOnConflict(k8sretry.DefaultRetry, func() error { + sts, err := pxc.StatefulSet(ctx, r.client, sfs, podSpec, cr, secrets, initImageName, r.getConfigVolume) + if err != nil { + return errors.Wrap(err, "construct statefulset") + } + if err = setControllerReference(cr, sts, r.scheme); err != nil { + return errors.Wrap(err, "set controller reference") + } + currentSet := sfs.StatefulSet() - err := r.client.Get(ctx, types.NamespacedName{Name: currentSet.Name, Namespace: currentSet.Namespace}, currentSet) + err = r.client.Get(ctx, types.NamespacedName{Name: currentSet.Name, Namespace: currentSet.Namespace}, currentSet) if err != nil { return errors.Wrap(err, "failed to get statefulset") } + // Keep same volumeClaimTemplates labels if statefulset already exists. + // We can't update volumeClaimTemplates. + if err == nil && cr.CompareVersionWith("1.16.0") >= 0 { + for i, pvc := range currentSet.Spec.VolumeClaimTemplates { + sts.Spec.VolumeClaimTemplates[i].Labels = pvc.Labels + } + } + annotations := currentSet.Spec.Template.Annotations labels := currentSet.Spec.Template.Labels - sts, err := pxc.StatefulSet(ctx, r.client, sfs, podSpec, cr, secrets, initImageName, r.getConfigVolume) - if err != nil { - return errors.Wrap(err, "construct statefulset") - } - // support annotation adjustements - pxc.MergeMaps(annotations, sts.Spec.Template.Annotations, newAnnotations) + util.MergeMaps(annotations, sts.Spec.Template.Annotations, newAnnotations) - pxc.MergeMaps(labels, sts.Spec.Template.Labels) + util.MergeMaps(labels, sts.Spec.Template.Labels) for k, v := range hashAnnotations { if v != "" || k == "percona.com/configuration-hash" { @@ -558,15 +571,15 @@ func (r *ReconcilePerconaXtraDBCluster) waitPodRestart(ctx context.Context, cr * } func isPXC(sfs api.StatefulApp) bool { - return sfs.Labels()["app.kubernetes.io/component"] == "pxc" + return sfs.Labels()[naming.LabelAppKubernetesComponent] == "pxc" } func isHAproxy(sfs api.StatefulApp) bool { - return sfs.Labels()["app.kubernetes.io/component"] == "haproxy" + return sfs.Labels()[naming.LabelAppKubernetesComponent] == "haproxy" } func isProxySQL(sfs api.StatefulApp) bool { - return sfs.Labels()["app.kubernetes.io/component"] == "proxysql" + return sfs.Labels()[naming.LabelAppKubernetesComponent] == "proxysql" } func (r *ReconcilePerconaXtraDBCluster) isBackupRunning(cr *api.PerconaXtraDBCluster) (bool, error) { @@ -639,7 +652,7 @@ func (r *ReconcilePerconaXtraDBCluster) getConfigHash(cr *api.PerconaXtraDBClust name := types.NamespacedName{ Namespace: cr.Namespace, - Name: ls["app.kubernetes.io/instance"] + "-" + ls["app.kubernetes.io/component"], + Name: ls[naming.LabelAppKubernetesInstance] + "-" + ls[naming.LabelAppKubernetesComponent], } obj, err := r.getFirstExisting(name, &corev1.Secret{}, &corev1.ConfigMap{}) diff --git a/pkg/controller/pxc/volumes.go b/pkg/controller/pxc/volumes.go index bb64a56654..d7a705766e 100644 --- a/pkg/controller/pxc/volumes.go +++ b/pkg/controller/pxc/volumes.go @@ -21,6 +21,7 @@ import ( pxcv1 "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" "github.com/percona/percona-xtradb-cluster-operator/pkg/k8s" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/statefulset" ) @@ -36,14 +37,7 @@ func (r *ReconcilePerconaXtraDBCluster) reconcilePersistentVolumes(ctx context.C pxcSet := statefulset.NewNode(cr) sts := pxcSet.StatefulSet() - ls := map[string]string{ - "app.kubernetes.io/component": "pxc", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } - + ls := naming.LabelsPXC(cr) log := logf.FromContext(ctx).WithName("PVCResize").WithValues("sts", sts.Name) pvcList := &corev1.PersistentVolumeClaimList{} diff --git a/pkg/controller/pxcbackup/controller.go b/pkg/controller/pxcbackup/controller.go index c7dccf08b3..fb354bfd70 100644 --- a/pkg/controller/pxcbackup/controller.go +++ b/pkg/controller/pxcbackup/controller.go @@ -204,7 +204,7 @@ func (r *ReconcilePerconaXtraDBClusterBackup) Reconcile(ctx context.Context, req switch storage.Type { case api.BackupStorageFilesystem: - pvc := backup.NewPVC(cr) + pvc := backup.NewPVC(cr, cluster) pvc.Spec = *storage.Volume.PersistentVolumeClaim cr.Status.Destination.SetPVCDestination(pvc.Name) @@ -337,7 +337,6 @@ func (r *ReconcilePerconaXtraDBClusterBackup) runDeleteBackupFinalizer(ctx conte log.Info("failed to delete backup", "backup path", cr.Status.Destination, "error", err.Error()) finalizers = append(finalizers, f) } else if f == naming.FinalizerDeleteBackup || f == naming.FinalizerS3DeleteBackup { - log.Info("backup was removed", "name", cr.Name) } } diff --git a/pkg/controller/pxcrestore/restorer.go b/pkg/controller/pxcrestore/restorer.go index 95c3f19f41..e726d3b9d5 100644 --- a/pkg/controller/pxcrestore/restorer.go +++ b/pkg/controller/pxcrestore/restorer.go @@ -128,7 +128,7 @@ func (s *pvc) PITRJob() (*batchv1.Job, error) { func (s *pvc) Init(ctx context.Context) error { destination := s.bcp.Status.Destination - svc := backup.PVCRestoreService(s.cr) + svc := backup.PVCRestoreService(s.cr, s.cluster) if err := k8s.SetControllerReference(s.cr, svc, s.scheme); err != nil { return err } @@ -169,7 +169,7 @@ func (s *pvc) Init(ctx context.Context) error { } func (s *pvc) Finalize(ctx context.Context) error { - svc := backup.PVCRestoreService(s.cr) + svc := backup.PVCRestoreService(s.cr, s.cluster) if err := s.k8sClient.Delete(ctx, svc); err != nil { return errors.Wrap(err, "failed to delete pvc service") } diff --git a/pkg/naming/backup.go b/pkg/naming/backup.go new file mode 100644 index 0000000000..ec7957d5d6 --- /dev/null +++ b/pkg/naming/backup.go @@ -0,0 +1,74 @@ +package naming + +import ( + "fmt" + "hash/crc32" + "strconv" + "time" + + "k8s.io/apimachinery/pkg/util/validation" +) + +// BackupJobName generates legit name for backup resources. +// k8s sets the `job-name` label for the created by job pod. +// So we have to be sure that job name won't be longer than 63 symbols. +// Yet the job name has to have some meaningful name which won't be conflicting with other jobs' names. +func BackupJobName(crName string, isCron bool) string { + return trimJobName("xb-" + crName) +} + +// trimJobName trims the provided string to ensure it stays within the 63-character limit. +// The job name will be included in the "batch.kubernetes.io/job-name" label in the ".spec.template" section of the job. +// Labels have a maximum length of 63 characters, so this function ensures the job name fits within that limit. +func trimJobName(name string) string { + trimLeft := func(name string) string { + for i := 0; i < len(name); i++ { + if (name[i] < 'a' || name[i] > 'z') && (name[i] < '0' || name[i] > '9') { + continue + } + return name[i:] + } + return "" + } + + trimRight := func(name string) string { + for i := len(name) - 1; i >= 0; i-- { + if (name[i] < 'a' || name[i] > 'z') && (name[i] < '0' || name[i] > '9') { + continue + } + return name[:i+1] + } + return "" + } + + name = trimLeft(name) + name = trimRight(name) + if len(name) > validation.DNS1035LabelMaxLength { + name = name[:validation.DNS1035LabelMaxLength] + name = trimRight(name) + } + + return name +} + +func ScheduledBackupName(crName, storageName, schedule string) string { + result := "cron-" + + if len(crName) > 16 { + result += crName[:16] + } else { + result += crName + } + + if len(storageName) > 16 { + result += storageName[:16] + } else { + result += storageName + } + + result += "-" + storageName + "-" + tnow := time.Now() + result += fmt.Sprintf("%d%d%d%d%d%d", tnow.Year(), tnow.Month(), tnow.Day(), tnow.Hour(), tnow.Minute(), tnow.Second()) + result += "-" + strconv.FormatUint(uint64(crc32.ChecksumIEEE([]byte(schedule))), 32)[:5] + return result +} diff --git a/pkg/naming/labels.go b/pkg/naming/labels.go new file mode 100644 index 0000000000..56d0d08b5e --- /dev/null +++ b/pkg/naming/labels.go @@ -0,0 +1,184 @@ +package naming + +import ( + api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/util" +) + +const ( + appKuberenetesPrefix = "app.kubernetes.io/" + perconaPrefix = "percona.com/" +) + +const ( + LabelAppKubernetesInstance = appKuberenetesPrefix + "instance" + LabelAppKubernetesName = appKuberenetesPrefix + "name" + LabelAppKubernetesComponent = appKuberenetesPrefix + "component" + LabelAppKubernetesManagedBy = appKuberenetesPrefix + "managed-by" + LabelAppKubernetesPartOf = appKuberenetesPrefix + "part-of" +) + +const ( + LabelPerconaClusterName = perconaPrefix + "cluster" + + LabelPerconaBackupType = perconaPrefix + "backup-type" + LabelPerconaBackupName = perconaPrefix + "backup-name" + LabelPerconaBackupJobName = perconaPrefix + "backup-job-name" + LabelPerconaBackupAncestorName = perconaPrefix + "backup-ancestor" + + LabelPerconaRestoreServiceName = perconaPrefix + "restore-svc-name" + LabelPerconaRestoreJobName = perconaPrefix + "restore-job-name" +) + +func LabelsCluster(cr *api.PerconaXtraDBCluster) map[string]string { + return map[string]string{ + LabelAppKubernetesName: "percona-xtradb-cluster", + LabelAppKubernetesInstance: cr.Name, + LabelAppKubernetesManagedBy: "percona-xtradb-cluster-operator", + LabelAppKubernetesPartOf: "percona-xtradb-cluster", + } +} + +const ( + componentPITR = "pitr" + componentPXC = "pxc" + componentExternalService = "external-service" + + ComponentProxySQL = "proxysql" + ComponentHAProxy = "haproxy" +) + +func componentLabels(cr *api.PerconaXtraDBCluster, component string) map[string]string { + m := LabelsCluster(cr) + m[LabelAppKubernetesComponent] = component + return m +} + +func LabelsPITR(cr *api.PerconaXtraDBCluster) map[string]string { + return componentLabels(cr, componentPITR) +} + +func LabelsProxySQL(cr *api.PerconaXtraDBCluster) map[string]string { + return componentLabels(cr, ComponentProxySQL) +} + +func LabelsHAProxy(cr *api.PerconaXtraDBCluster) map[string]string { + return componentLabels(cr, ComponentHAProxy) +} + +func LabelsPXC(cr *api.PerconaXtraDBCluster) map[string]string { + return componentLabels(cr, componentPXC) +} + +func LabelsRestorePVCPod(cr *api.PerconaXtraDBCluster, storageName string, restoreSvcName string) map[string]string { + labels := make(map[string]string) + if cr.Spec.Backup.Storages != nil && cr.Spec.Backup.Storages[storageName] != nil && len(cr.Spec.Backup.Storages[storageName].Labels) > 0 { + util.MergeMaps(labels, cr.Spec.Backup.Storages[storageName].Labels) + } + + if cr.CompareVersionWith("1.16.0") < 0 { + labels["name"] = restoreSvcName + return labels + } + + util.MergeMaps(labels, LabelsCluster(cr), map[string]string{ + LabelPerconaRestoreServiceName: restoreSvcName, + }) + return labels +} + +func LabelsRestoreJob(cr *api.PerconaXtraDBCluster, jobName string, storageName string) map[string]string { + if cr.CompareVersionWith("1.16.0") < 0 { + return cr.Spec.PXC.Labels + } + + labels := make(map[string]string) + + // TODO: should we add labels from storage or from .spec.pxc.labels ??? + if cr.Spec.Backup.Storages != nil && cr.Spec.Backup.Storages[storageName] != nil && len(cr.Spec.Backup.Storages[storageName].Labels) > 0 { + util.MergeMaps(labels, cr.Spec.Backup.Storages[storageName].Labels) + } + + util.MergeMaps(labels, LabelsCluster(cr), map[string]string{ + LabelPerconaRestoreJobName: jobName, + }) + + return labels +} + +func LabelsScheduledBackup(cluster *api.PerconaXtraDBCluster, ancestor string) map[string]string { + labels := make(map[string]string) + + if cluster.CompareVersionWith("1.16.0") < 0 { + util.MergeMaps(labels, map[string]string{ + "ancestor": ancestor, + "cluster": cluster.Name, + "type": "cron", + }) + } else { + util.MergeMaps(labels, LabelsCluster(cluster), map[string]string{ + LabelPerconaBackupType: "cron", + LabelPerconaClusterName: cluster.Name, + LabelPerconaBackupAncestorName: ancestor, + }) + } + + return labels +} + +func LabelsBackupJob(cr *api.PerconaXtraDBClusterBackup, cluster *api.PerconaXtraDBCluster, jobName string) map[string]string { + labels := make(map[string]string) + util.MergeMaps(labels, cluster.Spec.Backup.Storages[cr.Spec.StorageName].Labels) + + if cluster.CompareVersionWith("1.16.0") < 0 { + util.MergeMaps(labels, map[string]string{ + "type": "xtrabackup", + "cluster": cr.Spec.PXCCluster, + "backup-name": cr.Name, + "job-name": jobName, + }) + } else { + util.MergeMaps(labels, LabelsCluster(cluster), map[string]string{ + LabelPerconaBackupType: "xtrabackup", + LabelPerconaClusterName: cr.Spec.PXCCluster, + LabelPerconaBackupName: cr.Name, + LabelPerconaBackupJobName: jobName, + }) + } + + return labels +} + +func LabelsExternalService(cr *api.PerconaXtraDBCluster) map[string]string { + if cr.CompareVersionWith("1.16.0") < 0 { + return map[string]string{ + LabelAppKubernetesName: "percona-xtradb-cluster", + LabelAppKubernetesInstance: cr.Name, + LabelAppKubernetesComponent: componentExternalService, + } + } + return componentLabels(cr, componentExternalService) +} + +func selector(cr *api.PerconaXtraDBCluster, component string) map[string]string { + if cr.CompareVersionWith("1.16.0") < 0 { + return map[string]string{ + LabelAppKubernetesName: "percona-xtradb-cluster", + LabelAppKubernetesInstance: cr.Name, + LabelAppKubernetesComponent: component, + } + } + return componentLabels(cr, component) +} + +func SelectorPXC(cr *api.PerconaXtraDBCluster) map[string]string { + return selector(cr, componentPXC) +} + +func SelectorHAProxy(cr *api.PerconaXtraDBCluster) map[string]string { + return selector(cr, ComponentHAProxy) +} + +func SelectorProxySQL(cr *api.PerconaXtraDBCluster) map[string]string { + return selector(cr, ComponentProxySQL) +} diff --git a/pkg/pxc/app/config/configmap.go b/pkg/pxc/app/config/configmap.go index ffb3709710..2faff14997 100644 --- a/pkg/pxc/app/config/configmap.go +++ b/pkg/pxc/app/config/configmap.go @@ -8,9 +8,14 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" ) func NewConfigMap(cr *api.PerconaXtraDBCluster, cmName, filename, content string) *corev1.ConfigMap { + var ls map[string]string + if cr.CompareVersionWith("1.16.0") >= 0 { + ls = naming.LabelsCluster(cr) + } return &corev1.ConfigMap{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", @@ -19,6 +24,7 @@ func NewConfigMap(cr *api.PerconaXtraDBCluster, cmName, filename, content string ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: cr.Namespace, + Labels: ls, }, Data: map[string]string{ filename: content, @@ -31,6 +37,10 @@ func NewAutoTuneConfigMap(cr *api.PerconaXtraDBCluster, memory *resource.Quantit if err != nil { return nil, err } + var ls map[string]string + if cr.CompareVersionWith("1.16.0") >= 0 { + ls = naming.LabelsCluster(cr) + } return &corev1.ConfigMap{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", @@ -39,6 +49,7 @@ func NewAutoTuneConfigMap(cr *api.PerconaXtraDBCluster, memory *resource.Quantit ObjectMeta: metav1.ObjectMeta{ Name: cmName, Namespace: cr.Namespace, + Labels: ls, }, Data: map[string]string{ "auto-config.cnf": "[mysqld]" + autotuneParams, diff --git a/pkg/pxc/app/deployment/binlog-collector.go b/pkg/pxc/app/deployment/binlog-collector.go index ddb852422d..b80331bfb9 100644 --- a/pkg/pxc/app/deployment/binlog-collector.go +++ b/pkg/pxc/app/deployment/binlog-collector.go @@ -17,6 +17,7 @@ import ( "github.com/percona/percona-xtradb-cluster-operator/clientcmd" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/statefulset" @@ -33,13 +34,7 @@ func GetBinlogCollectorDeployment(cr *api.PerconaXtraDBCluster, initImage string return appsv1.Deployment{}, errors.Wrap(err, "get buffer size") } - labels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "pitr", - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } + labels := naming.LabelsPITR(cr) for key, value := range cr.Spec.Backup.Storages[cr.Spec.Backup.PITR.StorageName].Labels { labels[key] = value } @@ -122,7 +117,7 @@ func GetBinlogCollectorDeployment(cr *api.PerconaXtraDBCluster, initImage string ) } - return appsv1.Deployment{ + depl := appsv1.Deployment{ TypeMeta: metav1.TypeMeta{ APIVersion: "apps/v1", Kind: "Deployment", @@ -160,7 +155,13 @@ func GetBinlogCollectorDeployment(cr *api.PerconaXtraDBCluster, initImage string }, }, }, - }, nil + } + + if cr.CompareVersionWith("1.16.0") >= 0 { + depl.Labels = labels + } + + return depl, nil } func getStorageEnvs(cr *api.PerconaXtraDBCluster) ([]corev1.EnvVar, error) { @@ -284,14 +285,8 @@ func GetBinlogCollectorPod(ctx context.Context, c client.Client, cr *api.Percona err := c.List(ctx, &collectorPodList, &client.ListOptions{ - Namespace: cr.Namespace, - LabelSelector: labels.SelectorFromSet(map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "pitr", - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - }), + Namespace: cr.Namespace, + LabelSelector: labels.SelectorFromSet(naming.LabelsPITR(cr)), }, ) if err != nil { diff --git a/pkg/pxc/app/statefulset/haproxy.go b/pkg/pxc/app/statefulset/haproxy.go index e0f15e8908..ce2caac6b9 100644 --- a/pkg/pxc/app/statefulset/haproxy.go +++ b/pkg/pxc/app/statefulset/haproxy.go @@ -13,53 +13,27 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" app "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" ) const ( - haproxyName = "haproxy" haproxyDataVolumeName = "haproxydata" ) type HAProxy struct { - sfs *appsv1.StatefulSet - labels map[string]string - service string + cr *api.PerconaXtraDBCluster } func NewHAProxy(cr *api.PerconaXtraDBCluster) *HAProxy { - sfs := &appsv1.StatefulSet{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "apps/v1", - Kind: "StatefulSet", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: cr.Name + "-" + haproxyName, - Namespace: cr.Namespace, - }, - Spec: appsv1.StatefulSetSpec{ - PodManagementPolicy: "OrderedReady", - }, - } - - labels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": haproxyName, - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } - return &HAProxy{ - sfs: sfs, - labels: labels, - service: cr.Name + "-" + haproxyName, + cr: cr.DeepCopy(), } } func (c *HAProxy) Name() string { - return haproxyName + return naming.ComponentHAProxy } func (c *HAProxy) InitContainers(cr *api.PerconaXtraDBCluster, initImageName string) []corev1.Container { @@ -76,7 +50,7 @@ func (c *HAProxy) AppContainer(spec *api.PodSpec, secrets string, cr *api.Percon _ []corev1.Volume, ) (corev1.Container, error) { appc := corev1.Container{ - Name: haproxyName, + Name: naming.ComponentHAProxy, Image: spec.Image, ImagePullPolicy: spec.ImagePullPolicy, Ports: []corev1.ContainerPort{ @@ -106,7 +80,7 @@ func (c *HAProxy) AppContainer(spec *api.PodSpec, secrets string, cr *api.Percon Env: []corev1.EnvVar{ { Name: "PXC_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-" + "pxc", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-" + "pxc", }, }, SecurityContext: spec.ContainerSecurityContext, @@ -233,7 +207,7 @@ func (c *HAProxy) SidecarContainers(spec *api.PodSpec, secrets string, cr *api.P Env: []corev1.EnvVar{ { Name: "PXC_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-" + "pxc", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-" + "pxc", }, }, Resources: spec.SidecarResources, @@ -434,7 +408,7 @@ func (c *HAProxy) PMMContainer(ctx context.Context, cl client.Client, spec *api. func (c *HAProxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg api.CustomVolumeGetter) (*api.Volume, error) { vol := app.Volumes(podSpec, haproxyDataVolumeName) - configVolume, err := vg(cr.Namespace, "haproxy-custom", c.labels["app.kubernetes.io/instance"]+"-haproxy", true) + configVolume, err := vg(cr.Namespace, "haproxy-custom", c.Labels()[naming.LabelAppKubernetesInstance]+"-haproxy", true) if err != nil { return nil, err } @@ -451,7 +425,7 @@ func (c *HAProxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg } if cr.CompareVersionWith("1.11.0") >= 0 && cr.Spec.HAProxy != nil && cr.Spec.HAProxy.HookScript != "" { vol.Volumes = append(vol.Volumes, - app.GetConfigVolumes("hookscript", c.labels["app.kubernetes.io/instance"]+"-"+c.labels["app.kubernetes.io/component"]+"-hookscript")) + app.GetConfigVolumes("hookscript", c.Labels()[naming.LabelAppKubernetesInstance]+"-"+c.Labels()[naming.LabelAppKubernetesComponent]+"-hookscript")) } if cr.CompareVersionWith("1.13.0") >= 0 { vol.Volumes = append(vol.Volumes, @@ -463,19 +437,37 @@ func (c *HAProxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg }, ) } + if cr.CompareVersionWith("1.16.0") >= 0 { + for i := range vol.PVCs { + vol.PVCs[i].Labels = c.Labels() + } + } return vol, nil } +// StatefulSet returns a new statefulset object with almost empty spec. func (c *HAProxy) StatefulSet() *appsv1.StatefulSet { - return c.sfs + return &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "apps/v1", + Kind: "StatefulSet", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: c.cr.Name + "-" + naming.ComponentHAProxy, + Namespace: c.cr.Namespace, + }, + Spec: appsv1.StatefulSetSpec{ + PodManagementPolicy: "OrderedReady", + }, + } } func (c *HAProxy) Labels() map[string]string { - return c.labels + return naming.LabelsHAProxy(c.cr) } func (c *HAProxy) Service() string { - return c.service + return c.cr.Name + "-" + naming.ComponentHAProxy } func (c *HAProxy) UpdateStrategy(cr *api.PerconaXtraDBCluster) appsv1.StatefulSetUpdateStrategy { diff --git a/pkg/pxc/app/statefulset/node.go b/pkg/pxc/app/statefulset/node.go index 04c0b8ea82..c829e29206 100644 --- a/pkg/pxc/app/statefulset/node.go +++ b/pkg/pxc/app/statefulset/node.go @@ -13,6 +13,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" app "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/config" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" @@ -23,35 +24,12 @@ const ( ) type Node struct { - sfs *appsv1.StatefulSet - labels map[string]string - service string + cr *api.PerconaXtraDBCluster } func NewNode(cr *api.PerconaXtraDBCluster) *Node { - sfs := &appsv1.StatefulSet{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "apps/v1", - Kind: "StatefulSet", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: cr.Name + "-" + app.Name, - Namespace: cr.Namespace, - }, - } - - labels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "pxc", - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } - return &Node{ - sfs: sfs, - labels: labels, - service: cr.Name + "-" + app.Name, + cr: cr.DeepCopy(), } } @@ -169,7 +147,7 @@ func (c *Node) AppContainer(spec *api.PodSpec, secrets string, cr *api.PerconaXt Env: []corev1.EnvVar{ { Name: "PXC_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-" + c.labels["app.kubernetes.io/component"] + "-unready", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-" + c.Labels()[naming.LabelAppKubernetesComponent] + "-unready", }, { Name: "MONITOR_HOST", @@ -554,19 +532,35 @@ func (c *Node) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg ap vol.Volumes = append(vol.Volumes, app.GetSecretVolumes("mysql-init-file", cr.Name+"-mysql-init", true)) } + if cr.CompareVersionWith("1.16.0") >= 0 { + for i := range vol.PVCs { + vol.PVCs[i].Labels = c.Labels() + } + } + return vol, nil } +// StatefulSet returns a new statefulset object with empty spec. func (c *Node) StatefulSet() *appsv1.StatefulSet { - return c.sfs + return &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "apps/v1", + Kind: "StatefulSet", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: c.cr.Name + "-" + app.Name, + Namespace: c.cr.Namespace, + }, + } } func (c *Node) Labels() map[string]string { - return c.labels + return naming.LabelsPXC(c.cr) } func (c *Node) Service() string { - return c.service + return c.cr.Name + "-" + app.Name } func (c *Node) UpdateStrategy(cr *api.PerconaXtraDBCluster) appsv1.StatefulSetUpdateStrategy { diff --git a/pkg/pxc/app/statefulset/proxysql.go b/pkg/pxc/app/statefulset/proxysql.go index b5ca3e6c0e..defe2eb6ec 100644 --- a/pkg/pxc/app/statefulset/proxysql.go +++ b/pkg/pxc/app/statefulset/proxysql.go @@ -11,51 +11,28 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" app "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/users" ) const ( - proxyName = "proxysql" proxyDataVolumeName = "proxydata" proxyConfigVolumeName = "config" ) type Proxy struct { - sfs *appsv1.StatefulSet - labels map[string]string - service string + cr *api.PerconaXtraDBCluster } func NewProxy(cr *api.PerconaXtraDBCluster) *Proxy { - sfs := &appsv1.StatefulSet{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "apps/v1", - Kind: "StatefulSet", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: cr.Name + "-" + proxyName, - Namespace: cr.Namespace, - }, - } - - labels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": proxyName, - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } - return &Proxy{ - sfs: sfs, - labels: labels, - service: cr.Name + "-proxysql-unready", + cr: cr.DeepCopy(), } } func (c *Proxy) Name() string { - return proxyName + return naming.ComponentProxySQL } func (c *Proxy) InitContainers(cr *api.PerconaXtraDBCluster, initImageName string) []corev1.Container { @@ -83,7 +60,7 @@ func (c *Proxy) AppContainer(spec *api.PodSpec, secrets string, cr *api.PerconaX availableVolumes []corev1.Volume, ) (corev1.Container, error) { appc := corev1.Container{ - Name: proxyName, + Name: naming.ComponentProxySQL, Image: spec.Image, ImagePullPolicy: spec.ImagePullPolicy, Ports: []corev1.ContainerPort{ @@ -113,7 +90,7 @@ func (c *Proxy) AppContainer(spec *api.PodSpec, secrets string, cr *api.PerconaX Env: []corev1.EnvVar{ { Name: "PXC_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-pxc", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-pxc", }, { Name: "MYSQL_ROOT_PASSWORD", @@ -205,7 +182,7 @@ func (c *Proxy) SidecarContainers(spec *api.PodSpec, secrets string, cr *api.Per Env: []corev1.EnvVar{ { Name: "PXC_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-pxc", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-pxc", }, { Name: "MYSQL_ROOT_PASSWORD", @@ -260,7 +237,7 @@ func (c *Proxy) SidecarContainers(spec *api.PodSpec, secrets string, cr *api.Per Env: []corev1.EnvVar{ { Name: "PROXYSQL_SERVICE", - Value: c.labels["app.kubernetes.io/instance"] + "-proxysql-unready", + Value: c.Labels()[naming.LabelAppKubernetesInstance] + "-proxysql-unready", }, { Name: "MYSQL_ROOT_PASSWORD", @@ -490,7 +467,7 @@ func (c *Proxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg a sslVolume, ) - configVolume, err := vg(cr.Namespace, proxyConfigVolumeName, ls["app.kubernetes.io/instance"]+"-proxysql", false) + configVolume, err := vg(cr.Namespace, proxyConfigVolumeName, ls[naming.LabelAppKubernetesInstance]+"-proxysql", false) if err != nil && !errors.Is(err, api.NoCustomVolumeErr) { return nil, err } @@ -499,7 +476,7 @@ func (c *Proxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg a } if cr.CompareVersionWith("1.11.0") >= 0 && cr.Spec.ProxySQL != nil && cr.Spec.ProxySQL.HookScript != "" { vol.Volumes = append(vol.Volumes, - app.GetConfigVolumes("hookscript", ls["app.kubernetes.io/instance"]+"-"+ls["app.kubernetes.io/component"]+"-hookscript")) + app.GetConfigVolumes("hookscript", ls[naming.LabelAppKubernetesInstance]+"-"+ls[naming.LabelAppKubernetesComponent]+"-hookscript")) } if cr.CompareVersionWith("1.13.0") >= 0 { vol.Volumes = append(vol.Volumes, @@ -511,19 +488,35 @@ func (c *Proxy) Volumes(podSpec *api.PodSpec, cr *api.PerconaXtraDBCluster, vg a }, ) } + + if cr.CompareVersionWith("1.16.0") >= 0 { + for i := range vol.PVCs { + vol.PVCs[i].Labels = ls + } + } return vol, nil } +// StatefulSet returns a new statefulset object with empty spec. func (c *Proxy) StatefulSet() *appsv1.StatefulSet { - return c.sfs + return &appsv1.StatefulSet{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "apps/v1", + Kind: "StatefulSet", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: c.cr.Name + "-" + naming.ComponentProxySQL, + Namespace: c.cr.Namespace, + }, + } } func (c *Proxy) Labels() map[string]string { - return c.labels + return naming.LabelsProxySQL(c.cr) } func (c *Proxy) Service() string { - return c.service + return c.cr.Name + "-proxysql-unready" } func (c *Proxy) UpdateStrategy(cr *api.PerconaXtraDBCluster) appsv1.StatefulSetUpdateStrategy { diff --git a/pkg/pxc/backup/job.go b/pkg/pxc/backup/job.go index 716fb00918..741b66086b 100644 --- a/pkg/pxc/backup/job.go +++ b/pkg/pxc/backup/job.go @@ -10,6 +10,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/statefulset" @@ -18,15 +19,12 @@ import ( ) func (*Backup) Job(cr *api.PerconaXtraDBClusterBackup, cluster *api.PerconaXtraDBCluster) *batchv1.Job { - // Copy from the original labels to the backup labels - labels := make(map[string]string) - for key, value := range cluster.Spec.Backup.Storages[cr.Spec.StorageName].Labels { - labels[key] = value + labelKeyBackupType := "type" + if cluster.CompareVersionWith("1.16.0") >= 0 { + labelKeyBackupType = naming.LabelPerconaBackupType } - labels["type"] = "xtrabackup" - labels["cluster"] = cr.Spec.PXCCluster - labels["backup-name"] = cr.Name - labels["job-name"] = GenName63(cr) + + jobName := naming.BackupJobName(cr.Name, cr.Labels[labelKeyBackupType] == "cron") return &batchv1.Job{ TypeMeta: metav1.TypeMeta{ @@ -34,9 +32,9 @@ func (*Backup) Job(cr *api.PerconaXtraDBClusterBackup, cluster *api.PerconaXtraD Kind: "Job", }, ObjectMeta: metav1.ObjectMeta{ - Name: labels["job-name"], + Name: jobName, Namespace: cr.Namespace, - Labels: labels, + Labels: naming.LabelsBackupJob(cr, cluster, jobName), Annotations: cluster.Spec.Backup.Storages[cr.Spec.StorageName].Annotations, }, } diff --git a/pkg/pxc/backup/names.go b/pkg/pxc/backup/names.go deleted file mode 100644 index 0fd6dcdb3f..0000000000 --- a/pkg/pxc/backup/names.go +++ /dev/null @@ -1,43 +0,0 @@ -package backup - -import ( - api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" -) - -// GenName63 generates legit name for backup resources. -// k8s sets the `job-name` label for the created by job pod. -// So we have to be sure that job name won't be longer than 63 symbols. -// Yet the job name has to have some meaningful name which won't be conflicting with other jobs' names. -func GenName63(cr *api.PerconaXtraDBClusterBackup) string { - postfix := cr.Name - maxNameLen := 16 - typ, ok := cr.GetLabels()["type"] - - // in case it's not a cron-job we're not sure if the name fits rules - // but there is more room for names - if !ok || typ != "cron" { - maxNameLen = 29 - postfix = trimNameRight(postfix, maxNameLen) - } - - name := "xb-" + postfix - - return name -} - -// trimNameRight if needed cut off symbol by symbol from the name right side -// until it satisfy requirements to end with an alphanumeric character and have a length no more than ln -func trimNameRight(name string, ln int) string { - if len(name) <= ln { - ln = len(name) - } - - for ; ln > 0; ln-- { - if name[ln-1] >= 'a' && name[ln-1] <= 'z' || - name[ln-1] >= '0' && name[ln-1] <= '9' { - break - } - } - - return name[:ln] -} diff --git a/pkg/pxc/backup/restore.go b/pkg/pxc/backup/restore.go index e7bb5ff5be..b4e45118ba 100644 --- a/pkg/pxc/backup/restore.go +++ b/pkg/pxc/backup/restore.go @@ -13,6 +13,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app" "github.com/percona/percona-xtradb-cluster-operator/pkg/pxc/app/statefulset" @@ -22,19 +23,21 @@ import ( var log = logf.Log.WithName("backup/restore") -func PVCRestoreService(cr *api.PerconaXtraDBClusterRestore) *corev1.Service { +func PVCRestoreService(cr *api.PerconaXtraDBClusterRestore, cluster *api.PerconaXtraDBCluster) *corev1.Service { + restoreSvcName := pvcRestoreSvcName(cr) + svc := &corev1.Service{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", Kind: "Service", }, ObjectMeta: metav1.ObjectMeta{ - Name: "restore-src-" + cr.Name + "-" + cr.Spec.PXCCluster, + Name: restoreSvcName, Namespace: cr.Namespace, }, Spec: corev1.ServiceSpec{ Selector: map[string]string{ - "name": "restore-src-" + cr.Name + "-" + cr.Spec.PXCCluster, + "name": restoreSvcName, }, Type: corev1.ServiceTypeClusterIP, Ports: []corev1.ServicePort{ @@ -50,9 +53,19 @@ func PVCRestoreService(cr *api.PerconaXtraDBClusterRestore) *corev1.Service { svc.Spec.ClusterIP = corev1.ClusterIPNone } + if cluster.CompareVersionWith("1.16.0") >= 0 { + svc.Labels = naming.LabelsCluster(cluster) + svc.Spec.Selector = naming.LabelsCluster(cluster) + svc.Spec.Selector[naming.LabelPerconaRestoreServiceName] = restoreSvcName + } + return svc } +func pvcRestoreSvcName(cr *api.PerconaXtraDBClusterRestore) string { + return "restore-src-" + cr.Name + "-" + cr.Spec.PXCCluster +} + func PVCRestorePod(cr *api.PerconaXtraDBClusterRestore, bcpStorageName, pvcName string, cluster *api.PerconaXtraDBCluster) (*corev1.Pod, error) { if _, ok := cluster.Spec.Backup.Storages[bcpStorageName]; !ok { log.Info("storage " + bcpStorageName + " doesn't exist") @@ -62,25 +75,21 @@ func PVCRestorePod(cr *api.PerconaXtraDBClusterRestore, bcpStorageName, pvcName cluster.Spec.Backup.Storages[bcpStorageName] = &api.BackupStorageSpec{} } - // Copy from the original labels to the restore labels - labels := make(map[string]string) - for key, value := range cluster.Spec.Backup.Storages[bcpStorageName].Labels { - labels[key] = value - } - labels["name"] = "restore-src-" + cr.Name + "-" + cr.Spec.PXCCluster - sslVolume := app.GetSecretVolumes("ssl", cluster.Spec.PXC.SSLSecretName, !cluster.TLSEnabled()) if cluster.CompareVersionWith("1.15.0") < 0 { sslVolume = app.GetSecretVolumes("ssl", cluster.Spec.PXC.SSLSecretName, cluster.Spec.AllowUnsafeConfig) } + restoreSvcName := pvcRestoreSvcName(cr) + + labels := naming.LabelsRestorePVCPod(cluster, bcpStorageName, restoreSvcName) return &corev1.Pod{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", Kind: "Pod", }, ObjectMeta: metav1.ObjectMeta{ - Name: "restore-src-" + cr.Name + "-" + cr.Spec.PXCCluster, + Name: restoreSvcName, Namespace: cr.Namespace, Annotations: cluster.Spec.Backup.Storages[bcpStorageName].Annotations, Labels: labels, @@ -259,12 +268,13 @@ func RestoreJob(cr *api.PerconaXtraDBClusterRestore, bcp *api.PerconaXtraDBClust ObjectMeta: metav1.ObjectMeta{ Name: jobName, Namespace: cr.Namespace, + Labels: naming.LabelsRestoreJob(cluster, jobName, bcp.Status.StorageName), }, Spec: batchv1.JobSpec{ Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: cluster.Spec.PXC.Annotations, - Labels: cluster.Spec.PXC.Labels, + Labels: naming.LabelsRestoreJob(cluster, jobName, bcp.Status.StorageName), }, Spec: corev1.PodSpec{ ImagePullSecrets: cluster.Spec.Backup.ImagePullSecrets, @@ -288,6 +298,9 @@ func RestoreJob(cr *api.PerconaXtraDBClusterRestore, bcp *api.PerconaXtraDBClust BackoffLimit: func(i int32) *int32 { return &i }(4), }, } + if cluster.CompareVersionWith("1.16.0") < 0 { + job.Labels = cluster.Spec.PXC.Labels + } return job, nil } diff --git a/pkg/pxc/backup/volume.go b/pkg/pxc/backup/volume.go index a955c9835a..4ddbc66850 100644 --- a/pkg/pxc/backup/volume.go +++ b/pkg/pxc/backup/volume.go @@ -5,18 +5,24 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" ) // NewPVC returns the list of PersistentVolumeClaims for the backups -func NewPVC(cr *api.PerconaXtraDBClusterBackup) *corev1.PersistentVolumeClaim { +func NewPVC(cr *api.PerconaXtraDBClusterBackup, cluster *api.PerconaXtraDBCluster) *corev1.PersistentVolumeClaim { + var ls map[string]string + if cluster.CompareVersionWith("1.16.0") >= 0 { + ls = naming.LabelsCluster(cluster) + } return &corev1.PersistentVolumeClaim{ TypeMeta: metav1.TypeMeta{ APIVersion: "v1", Kind: "PersistentVolumeClaim", }, ObjectMeta: metav1.ObjectMeta{ - Name: GenName63(cr), + Name: naming.BackupJobName(cr.Name, false), Namespace: cr.Namespace, + Labels: ls, }, } } diff --git a/pkg/pxc/pdb.go b/pkg/pxc/pdb.go index 7e5a497f77..be69ed2c91 100644 --- a/pkg/pxc/pdb.go +++ b/pkg/pxc/pdb.go @@ -5,17 +5,18 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" ) -func PodDisruptionBudget(spec *api.PodDisruptionBudgetSpec, labels map[string]string, namespace string) *policyv1.PodDisruptionBudget { - return &policyv1.PodDisruptionBudget{ +func PodDisruptionBudget(cr *api.PerconaXtraDBCluster, spec *api.PodDisruptionBudgetSpec, labels map[string]string) *policyv1.PodDisruptionBudget { + pdb := &policyv1.PodDisruptionBudget{ TypeMeta: metav1.TypeMeta{ APIVersion: "policy/v1", Kind: "PodDisruptionBudget", }, ObjectMeta: metav1.ObjectMeta{ - Name: labels["app.kubernetes.io/instance"] + "-" + labels["app.kubernetes.io/component"], - Namespace: namespace, + Name: labels[naming.LabelAppKubernetesInstance] + "-" + labels[naming.LabelAppKubernetesComponent], + Namespace: cr.Namespace, }, Spec: policyv1.PodDisruptionBudgetSpec{ MinAvailable: spec.MinAvailable, @@ -25,4 +26,9 @@ func PodDisruptionBudget(spec *api.PodDisruptionBudgetSpec, labels map[string]st }, }, } + if cr.CompareVersionWith("1.16.0") >= 0 { + pdb.Labels = labels + } + + return pdb } diff --git a/pkg/pxc/service.go b/pkg/pxc/service.go index aee0ed83b7..fbba05b38a 100644 --- a/pkg/pxc/service.go +++ b/pkg/pxc/service.go @@ -6,6 +6,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" ) const ( @@ -22,10 +23,7 @@ func NewServicePXC(cr *api.PerconaXtraDBCluster) *corev1.Service { ObjectMeta: metav1.ObjectMeta{ Name: cr.Name + "-" + appName, Namespace: cr.Namespace, - Labels: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - }, + Labels: naming.LabelsPXC(cr), }, Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ @@ -35,11 +33,7 @@ func NewServicePXC(cr *api.PerconaXtraDBCluster) *corev1.Service { }, }, ClusterIP: "None", - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": appName, - }, + Selector: naming.SelectorPXC(cr), }, } @@ -54,10 +48,6 @@ func NewServicePXC(cr *api.PerconaXtraDBCluster) *corev1.Service { } if cr.CompareVersionWith("1.9.0") >= 0 { - obj.ObjectMeta.Labels["app.kubernetes.io/component"] = appName - obj.ObjectMeta.Labels["app.kubernetes.io/managed-by"] = "percona-xtradb-cluster-operator" - obj.ObjectMeta.Labels["app.kubernetes.io/part-of"] = "percona-xtradb-cluster" - obj.Spec.Ports = append( obj.Spec.Ports, corev1.ServicePort{ @@ -89,10 +79,7 @@ func NewServicePXCUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { Annotations: map[string]string{ "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true", }, - Labels: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - }, + Labels: naming.LabelsPXC(cr), }, Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ @@ -102,11 +89,7 @@ func NewServicePXCUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { }, }, ClusterIP: "None", - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": appName, - }, + Selector: naming.SelectorPXC(cr), }, } @@ -121,10 +104,6 @@ func NewServicePXCUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { } if cr.CompareVersionWith("1.9.0") >= 0 { - obj.ObjectMeta.Labels["app.kubernetes.io/component"] = appName - obj.ObjectMeta.Labels["app.kubernetes.io/managed-by"] = "percona-xtradb-cluster-operator" - obj.ObjectMeta.Labels["app.kubernetes.io/part-of"] = "percona-xtradb-cluster" - obj.Spec.Ports = append( obj.Spec.Ports, corev1.ServicePort{ @@ -161,10 +140,7 @@ func NewServiceProxySQLUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { Annotations: map[string]string{ "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true", }, - Labels: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - }, + Labels: naming.LabelsProxySQL(cr), }, Spec: corev1.ServiceSpec{ Ports: []corev1.ServicePort{ @@ -178,11 +154,7 @@ func NewServiceProxySQLUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { }, }, ClusterIP: "None", - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "proxysql", - }, + Selector: naming.SelectorProxySQL(cr), }, } @@ -196,12 +168,6 @@ func NewServiceProxySQLUnready(cr *api.PerconaXtraDBCluster) *corev1.Service { ) } - if cr.CompareVersionWith("1.9.0") >= 0 { - obj.ObjectMeta.Labels["app.kubernetes.io/component"] = "proxysql" - obj.ObjectMeta.Labels["app.kubernetes.io/managed-by"] = "percona-xtradb-cluster-operator" - obj.ObjectMeta.Labels["app.kubernetes.io/part-of"] = "percona-xtradb-cluster" - } - if cr.CompareVersionWith("1.10.0") >= 0 { obj.Spec.PublishNotReadyAddresses = true delete(obj.ObjectMeta.Annotations, "service.alpha.kubernetes.io/tolerate-unready-endpoints") @@ -222,10 +188,7 @@ func NewServiceProxySQL(cr *api.PerconaXtraDBCluster) *corev1.Service { } serviceAnnotations := make(map[string]string) - serviceLabels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - } + serviceLabels := naming.LabelsProxySQL(cr) loadBalancerSourceRanges := []string{} loadBalancerIP := "" @@ -262,11 +225,7 @@ func NewServiceProxySQL(cr *api.PerconaXtraDBCluster) *corev1.Service { Name: "mysql", }, }, - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "proxysql", - }, + Selector: naming.SelectorProxySQL(cr), LoadBalancerSourceRanges: loadBalancerSourceRanges, LoadBalancerIP: loadBalancerIP, }, @@ -310,12 +269,6 @@ func NewServiceProxySQL(cr *api.PerconaXtraDBCluster) *corev1.Service { ) } - if cr.CompareVersionWith("1.9.0") >= 0 { - obj.ObjectMeta.Labels["app.kubernetes.io/component"] = "proxysql" - obj.ObjectMeta.Labels["app.kubernetes.io/managed-by"] = "percona-xtradb-cluster-operator" - obj.ObjectMeta.Labels["app.kubernetes.io/part-of"] = "percona-xtradb-cluster" - } - return obj } @@ -331,13 +284,7 @@ func NewServiceHAProxy(cr *api.PerconaXtraDBCluster) *corev1.Service { } serviceAnnotations := make(map[string]string) - serviceLabels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "haproxy", - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } + serviceLabels := naming.LabelsHAProxy(cr) loadBalancerSourceRanges := []string{} loadBalancerIP := "" @@ -380,11 +327,7 @@ func NewServiceHAProxy(cr *api.PerconaXtraDBCluster) *corev1.Service { Name: "proxy-protocol", }, }, - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "haproxy", - }, + Selector: naming.SelectorHAProxy(cr), LoadBalancerSourceRanges: loadBalancerSourceRanges, LoadBalancerIP: loadBalancerIP, }, @@ -468,13 +411,7 @@ func NewServiceHAProxyReplicas(cr *api.PerconaXtraDBCluster) *corev1.Service { } serviceAnnotations := make(map[string]string) - serviceLabels := map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "haproxy", - "app.kubernetes.io/managed-by": "percona-xtradb-cluster-operator", - "app.kubernetes.io/part-of": "percona-xtradb-cluster", - } + serviceLabels := naming.LabelsHAProxy(cr) loadBalancerSourceRanges := []string{} loadBalancerIP := "" if cr.Spec.HAProxy != nil { @@ -526,11 +463,7 @@ func NewServiceHAProxyReplicas(cr *api.PerconaXtraDBCluster) *corev1.Service { Name: "mysql-replicas", }, }, - Selector: map[string]string{ - "app.kubernetes.io/name": "percona-xtradb-cluster", - "app.kubernetes.io/instance": cr.Name, - "app.kubernetes.io/component": "haproxy", - }, + Selector: naming.SelectorHAProxy(cr), LoadBalancerSourceRanges: loadBalancerSourceRanges, LoadBalancerIP: loadBalancerIP, }, diff --git a/pkg/pxc/statefulset.go b/pkg/pxc/statefulset.go index 75bcadee68..260767cf64 100644 --- a/pkg/pxc/statefulset.go +++ b/pkg/pxc/statefulset.go @@ -13,6 +13,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" api "github.com/percona/percona-xtradb-cluster-operator/pkg/apis/pxc/v1" + "github.com/percona/percona-xtradb-cluster-operator/pkg/naming" ) // StatefulSet returns StatefulSet according for app to podSpec @@ -38,7 +39,7 @@ func StatefulSet(ctx context.Context, cl client.Client, sfs api.StatefulApp, pod pod.Affinity = PodAffinity(podSpec.Affinity, sfs) pod.TopologySpreadConstraints = PodTopologySpreadConstraints(podSpec.TopologySpreadConstraints, sfs.Labels()) - if sfs.Labels()["app.kubernetes.io/component"] == "haproxy" && cr.CompareVersionWith("1.7.0") == -1 { + if sfs.Labels()[naming.LabelAppKubernetesComponent] == "haproxy" && cr.CompareVersionWith("1.7.0") == -1 { t := true pod.ShareProcessNamespace = &t } @@ -197,21 +198,3 @@ func PodTopologySpreadConstraints(tscs []corev1.TopologySpreadConstraint, ls map } return result } - -func MergeTemplateAnnotations(sfs *appsv1.StatefulSet, annotations map[string]string) { - if len(annotations) == 0 { - return - } - MergeMaps(sfs.Spec.Template.Annotations, annotations) -} - -func MergeMaps(dest map[string]string, mapList ...map[string]string) { - if dest == nil { - dest = make(map[string]string) - } - for _, m := range mapList { - for k, v := range m { - dest[k] = v - } - } -} diff --git a/pkg/util/map.go b/pkg/util/map.go new file mode 100644 index 0000000000..b87a0b93af --- /dev/null +++ b/pkg/util/map.go @@ -0,0 +1,23 @@ +package util + +import ( + appsv1 "k8s.io/api/apps/v1" +) + +func MergeTemplateAnnotations(sfs *appsv1.StatefulSet, annotations map[string]string) { + if len(annotations) == 0 { + return + } + MergeMaps(sfs.Spec.Template.Annotations, annotations) +} + +func MergeMaps(dest map[string]string, mapList ...map[string]string) { + if dest == nil { + dest = make(map[string]string) + } + for _, m := range mapList { + for k, v := range m { + dest[k] = v + } + } +}