From d7ab0f9eb2865d589cb58c90b37407ba6b4cd241 Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Fri, 20 Dec 2024 13:54:26 +0200 Subject: [PATCH 1/4] K8SPXC-1446: Update container image versions back to main and add a section in the upgrade-consistency test for 1.17.0 --- deploy/bundle.yaml | 2 +- deploy/cr-minimal.yaml | 8 ++-- deploy/cr.yaml | 16 ++++---- deploy/cw-bundle.yaml | 2 +- deploy/cw-operator.yaml | 2 +- deploy/operator.yaml | 2 +- ...ml => service_some-name-proxysql-1170.yml} | 2 + ...141.yml => service_some-name-pxc-1170.yml} | 2 + ...statefulset_some-name-proxysql-1151-oc.yml | 2 +- .../statefulset_some-name-proxysql-1151.yml | 2 +- ...statefulset_some-name-proxysql-1160-oc.yml | 2 +- .../statefulset_some-name-proxysql-1160.yml | 2 +- ...tatefulset_some-name-proxysql-1170-oc.yml} | 41 ++++++++++++++++--- ...> statefulset_some-name-proxysql-1170.yml} | 41 ++++++++++++++++--- .../statefulset_some-name-pxc-1151-oc.yml | 2 +- .../statefulset_some-name-pxc-1151.yml | 2 +- .../statefulset_some-name-pxc-1160-oc.yml | 2 +- .../statefulset_some-name-pxc-1160.yml | 2 +- ... => statefulset_some-name-pxc-1170-oc.yml} | 6 ++- ...yml => statefulset_some-name-pxc-1170.yml} | 6 ++- e2e-tests/upgrade-consistency/run | 30 +++++++------- version/version.go | 2 +- 22 files changed, 124 insertions(+), 54 deletions(-) rename e2e-tests/upgrade-consistency/compare/{service_some-name-proxysql-1141.yml => service_some-name-proxysql-1170.yml} (87%) rename e2e-tests/upgrade-consistency/compare/{service_some-name-pxc-1141.yml => service_some-name-pxc-1170.yml} (88%) rename e2e-tests/upgrade-consistency/compare/{statefulset_some-name-proxysql-1141-oc.yml => statefulset_some-name-proxysql-1170-oc.yml} (85%) rename e2e-tests/upgrade-consistency/compare/{statefulset_some-name-proxysql-1141.yml => statefulset_some-name-proxysql-1170.yml} (85%) rename e2e-tests/upgrade-consistency/compare/{statefulset_some-name-pxc-1141-oc.yml => statefulset_some-name-pxc-1170-oc.yml} (97%) rename e2e-tests/upgrade-consistency/compare/{statefulset_some-name-pxc-1141.yml => statefulset_some-name-pxc-1170.yml} (97%) diff --git a/deploy/bundle.yaml b/deploy/bundle.yaml index b49a9b175c..433a815c78 100644 --- a/deploy/bundle.yaml +++ b/deploy/bundle.yaml @@ -11522,7 +11522,7 @@ spec: value: percona-xtradb-cluster-operator - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-xtradb-cluster-operator:1.16.0 + image: perconalab/percona-xtradb-cluster-operator:main imagePullPolicy: Always livenessProbe: failureThreshold: 3 diff --git a/deploy/cr-minimal.yaml b/deploy/cr-minimal.yaml index e6ee1e879c..ae69121c41 100644 --- a/deploy/cr-minimal.yaml +++ b/deploy/cr-minimal.yaml @@ -3,7 +3,7 @@ kind: PerconaXtraDBCluster metadata: name: minimal-cluster spec: - crVersion: 1.16.0 + crVersion: 1.17.0 secretsName: minimal-cluster-secrets unsafeFlags: tls: true @@ -16,7 +16,7 @@ spec: enabled: false pxc: size: 1 - image: percona/percona-xtradb-cluster:8.0.39-30.1 + image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0 volumeSpec: persistentVolumeClaim: resources: @@ -25,7 +25,7 @@ spec: haproxy: enabled: true size: 1 - image: percona/haproxy:2.8.11 + image: perconalab/percona-xtradb-cluster-operator:main-haproxy logcollector: enabled: true - image: percona/percona-xtradb-cluster-operator:1.16.0-logcollector-fluentbit3.2.2 + image: perconalab/percona-xtradb-cluster-operator:main-logcollector diff --git a/deploy/cr.yaml b/deploy/cr.yaml index 42fc8d06c4..e009d2421e 100644 --- a/deploy/cr.yaml +++ b/deploy/cr.yaml @@ -10,7 +10,7 @@ metadata: # annotations: # percona.com/issue-vault-token: "true" spec: - crVersion: 1.16.0 + crVersion: 1.17.0 # enableVolumeExpansion: false # ignoreAnnotations: # - iam.amazonaws.com/role @@ -22,7 +22,7 @@ spec: # sslInternalSecretName: cluster1-ssl-internal # logCollectorSecretName: cluster1-log-collector-secrets # initContainer: -# image: percona/percona-xtradb-cluster-operator:1.16.0 +# image: perconalab/percona-xtradb-cluster-operator:main # containerSecurityContext: # privileged: false # runAsUser: 1001 @@ -58,7 +58,7 @@ spec: schedule: "0 4 * * *" pxc: size: 3 - image: percona/percona-xtradb-cluster:8.0.39-30.1 + image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0 autoRecovery: true # expose: # enabled: true @@ -206,7 +206,7 @@ spec: haproxy: enabled: true size: 3 - image: percona/haproxy:2.8.11 + image: perconalab/percona-xtradb-cluster-operator:main-haproxy # imagePullPolicy: Always # schedulerName: mycustom-scheduler # readinessDelaySec: 15 @@ -381,7 +381,7 @@ spec: proxysql: enabled: false size: 3 - image: percona/proxysql2:2.7.1 + image: perconalab/percona-xtradb-cluster-operator:main-proxysql # imagePullPolicy: Always # configuration: | # datadir="/var/lib/proxysql" @@ -543,7 +543,7 @@ spec: # - 10.0.0.0/8 logcollector: enabled: true - image: percona/percona-xtradb-cluster-operator:1.16.0-logcollector-fluentbit3.2.2 + image: perconalab/percona-xtradb-cluster-operator:main-logcollector # configuration: | # [OUTPUT] # Name es @@ -576,7 +576,7 @@ spec: pmm: enabled: false - image: percona/pmm-client:2.44.0 + image: perconalab/pmm-client:dev-latest serverHost: monitoring-service # serverUser: admin # pxcParams: "--disable-tablestats-limit=2000" @@ -589,7 +589,7 @@ spec: cpu: 300m backup: # allowParallel: true - image: percona/percona-xtradb-cluster-operator:1.16.0-pxc8.0-backup-pxb8.0.35 + image: perconalab/percona-xtradb-cluster-operator:main-pxc8.0-backup # backoffLimit: 6 # activeDeadlineSeconds: 3600 # serviceAccountName: percona-xtradb-cluster-operator diff --git a/deploy/cw-bundle.yaml b/deploy/cw-bundle.yaml index ff6ce4ba4c..588c3c63c2 100644 --- a/deploy/cw-bundle.yaml +++ b/deploy/cw-bundle.yaml @@ -11532,7 +11532,7 @@ spec: value: percona-xtradb-cluster-operator - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-xtradb-cluster-operator:1.16.0 + image: perconalab/percona-xtradb-cluster-operator:main imagePullPolicy: Always resources: limits: diff --git a/deploy/cw-operator.yaml b/deploy/cw-operator.yaml index c9dd05415c..4e498668cf 100644 --- a/deploy/cw-operator.yaml +++ b/deploy/cw-operator.yaml @@ -42,7 +42,7 @@ spec: value: percona-xtradb-cluster-operator - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-xtradb-cluster-operator:1.16.0 + image: perconalab/percona-xtradb-cluster-operator:main imagePullPolicy: Always resources: limits: diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 67bd5c469d..de903e0393 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -45,7 +45,7 @@ spec: value: percona-xtradb-cluster-operator - name: DISABLE_TELEMETRY value: "false" - image: percona/percona-xtradb-cluster-operator:1.16.0 + image: perconalab/percona-xtradb-cluster-operator:main imagePullPolicy: Always livenessProbe: failureThreshold: 3 diff --git a/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1141.yml b/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1170.yml similarity index 87% rename from e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1141.yml rename to e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1170.yml index f8230024bc..5b72198ae1 100644 --- a/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1141.yml +++ b/e2e-tests/upgrade-consistency/compare/service_some-name-proxysql-1170.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-1141.yml b/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1170.yml similarity index 88% rename from e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1141.yml rename to e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1170.yml index 84b12b6a85..951a2e3f8a 100644 --- a/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1141.yml +++ b/e2e-tests/upgrade-consistency/compare/service_some-name-pxc-1170.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/upgrade-consistency/compare/statefulset_some-name-proxysql-1151-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151-oc.yml index 4c620b3631..eb6c7be0c7 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 2 + generation: 1 name: some-name-proxysql ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151.yml index da341987be..e6b49d6831 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1151.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 2 + generation: 1 name: some-name-proxysql ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160-oc.yml index 43a9e27175..4c620b3631 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 3 + generation: 2 name: some-name-proxysql ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160.yml index fd94e821f1..da341987be 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1160.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 3 + generation: 2 name: some-name-proxysql ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170-oc.yml similarity index 85% rename from e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141-oc.yml rename to e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170-oc.yml index bee5037461..43a9e27175 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 1 + generation: 3 name: some-name-proxysql ownerReferences: - controller: true @@ -43,7 +43,15 @@ spec: app.kubernetes.io/part-of: percona-xtradb-cluster topologyKey: kubernetes.io/hostname containers: - - env: + - args: + - proxysql + - -f + - -c + - /etc/proxysql/proxysql.cnf + - --reload + command: + - /opt/percona/proxysql-entrypoint.sh + env: - name: PXC_SERVICE value: some-name-pxc - name: OPERATOR_PASSWORD @@ -92,9 +100,11 @@ spec: name: ssl - mountPath: /etc/proxysql/ssl-internal name: ssl-internal + - mountPath: /opt/percona + name: bin - args: - - /usr/bin/peer-list - - -on-change=/usr/bin/add_pxc_nodes.sh + - /opt/percona/peer-list + - -on-change=/opt/percona/proxysql_add_pxc_nodes.sh - -service=$(PXC_SERVICE) env: - name: PXC_SERVICE @@ -125,9 +135,12 @@ spec: resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin - args: - - /usr/bin/peer-list - - -on-change=/usr/bin/add_proxysql_nodes.sh + - /opt/percona/peer-list + - -on-change=/opt/percona/proxysql_add_proxysql_nodes.sh - -service=$(PROXYSQL_SERVICE) env: - name: PROXYSQL_SERVICE @@ -158,6 +171,9 @@ spec: resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin dnsPolicy: ClusterFirst initContainers: - command: @@ -173,6 +189,19 @@ spec: volumeMounts: - mountPath: /var/lib/mysql name: bin + - command: + - /proxysql-init-entrypoint.sh + imagePullPolicy: Always + name: proxysql-init + resources: + limits: + cpu: 50m + memory: 50M + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin restartPolicy: Always schedulerName: default-scheduler securityContext: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170.yml similarity index 85% rename from e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141.yml rename to e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170.yml index 24b74084f7..fd94e821f1 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1141.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-proxysql-1170.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 1 + generation: 3 name: some-name-proxysql ownerReferences: - controller: true @@ -43,7 +43,15 @@ spec: app.kubernetes.io/part-of: percona-xtradb-cluster topologyKey: kubernetes.io/hostname containers: - - env: + - args: + - proxysql + - -f + - -c + - /etc/proxysql/proxysql.cnf + - --reload + command: + - /opt/percona/proxysql-entrypoint.sh + env: - name: PXC_SERVICE value: some-name-pxc - name: OPERATOR_PASSWORD @@ -92,9 +100,11 @@ spec: name: ssl - mountPath: /etc/proxysql/ssl-internal name: ssl-internal + - mountPath: /opt/percona + name: bin - args: - - /usr/bin/peer-list - - -on-change=/usr/bin/add_pxc_nodes.sh + - /opt/percona/peer-list + - -on-change=/opt/percona/proxysql_add_pxc_nodes.sh - -service=$(PXC_SERVICE) env: - name: PXC_SERVICE @@ -125,9 +135,12 @@ spec: resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin - args: - - /usr/bin/peer-list - - -on-change=/usr/bin/add_proxysql_nodes.sh + - /opt/percona/peer-list + - -on-change=/opt/percona/proxysql_add_proxysql_nodes.sh - -service=$(PROXYSQL_SERVICE) env: - name: PROXYSQL_SERVICE @@ -158,6 +171,9 @@ spec: resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin dnsPolicy: ClusterFirst initContainers: - command: @@ -173,6 +189,19 @@ spec: volumeMounts: - mountPath: /var/lib/mysql name: bin + - command: + - /proxysql-init-entrypoint.sh + imagePullPolicy: Always + name: proxysql-init + resources: + limits: + cpu: 50m + memory: 50M + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/percona + name: bin restartPolicy: Always schedulerName: default-scheduler securityContext: diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151-oc.yml index 1d045b704a..668b2e76d8 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 2 + generation: 1 name: some-name-pxc ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151.yml index 35860b406e..47f50b57f0 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1151.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 2 + generation: 1 name: some-name-pxc ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160-oc.yml index 247a3e4e05..3c7cefba6e 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 3 + generation: 2 name: some-name-pxc ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160.yml index af86099bc3..76f6d99273 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1160.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 3 + generation: 2 name: some-name-pxc ownerReferences: - controller: true diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141-oc.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170-oc.yml similarity index 97% rename from e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141-oc.yml rename to e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170-oc.yml index 668b2e76d8..247a3e4e05 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141-oc.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170-oc.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 1 + generation: 3 name: some-name-pxc ownerReferences: - controller: true @@ -125,6 +125,10 @@ spec: value: "15" - name: DEFAULT_AUTHENTICATION_PLUGIN value: mysql_native_password + - name: MYSQL_NOTIFY_SOCKET + value: /var/lib/mysql/notify.sock + - name: MYSQL_STATE_FILE + value: /var/lib/mysql/mysql.state envFrom: - secretRef: name: some-name-env-vars-pxc diff --git a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141.yml b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170.yml similarity index 97% rename from e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141.yml rename to e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170.yml index 47f50b57f0..af86099bc3 100644 --- a/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1141.yml +++ b/e2e-tests/upgrade-consistency/compare/statefulset_some-name-pxc-1170.yml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - generation: 1 + generation: 3 name: some-name-pxc ownerReferences: - controller: true @@ -125,6 +125,10 @@ spec: value: "15" - name: DEFAULT_AUTHENTICATION_PLUGIN value: mysql_native_password + - name: MYSQL_NOTIFY_SOCKET + value: /var/lib/mysql/notify.sock + - name: MYSQL_STATE_FILE + value: /var/lib/mysql/mysql.state envFrom: - secretRef: name: some-name-env-vars-pxc diff --git a/e2e-tests/upgrade-consistency/run b/e2e-tests/upgrade-consistency/run index 5372faa4f6..d860630c82 100755 --- a/e2e-tests/upgrade-consistency/run +++ b/e2e-tests/upgrade-consistency/run @@ -38,27 +38,15 @@ main() { kubectl_bin apply \ -f "$test_dir/conf/secrets.yml" cat_config "$conf_dir/$cluster.yml" \ - | yq eval '.spec.crVersion = "1.14.1"' - \ + | yq eval '.spec.crVersion = "1.15.1"' - \ | kubectl_bin apply -f - - desc "test 1.14.1" - kubectl_bin patch pxc "$cluster" --type=merge --patch '{ - "spec": {"crVersion":"1.14.1"} - }' - wait_cluster_consistency "$cluster" 3 2 - wait_for_sts_generation "$cluster-pxc" "1" "1" - desc "compare k8s objects" - compare_kubectl service/$cluster-pxc "-1141" - compare_kubectl service/$cluster-proxysql "-1141" - compare_kubectl statefulset/$cluster-pxc "-1141" - compare_kubectl statefulset/$cluster-proxysql "-1141" - desc "test 1.15.1" kubectl_bin patch pxc "$cluster" --type=merge --patch '{ "spec": {"crVersion":"1.15.1"} }' wait_cluster_consistency "$cluster" 3 2 - wait_for_sts_generation "$cluster-pxc" "2" "1" + wait_for_sts_generation "$cluster-pxc" "1" "1" desc "compare k8s objects" compare_kubectl service/$cluster-pxc "-1151" compare_kubectl service/$cluster-proxysql "-1151" @@ -70,13 +58,25 @@ main() { "spec": {"crVersion":"1.16.0"} }' wait_cluster_consistency "$cluster" 3 2 - wait_for_sts_generation "$cluster-pxc" "3" "1" + wait_for_sts_generation "$cluster-pxc" "2" "1" desc "compare k8s objects" compare_kubectl service/$cluster-pxc "-1160" compare_kubectl service/$cluster-proxysql "-1160" compare_kubectl statefulset/$cluster-pxc "-1160" compare_kubectl statefulset/$cluster-proxysql "-1160" + desc "test 1.17.0" + kubectl_bin patch pxc "$cluster" --type=merge --patch '{ + "spec": {"crVersion":"1.17.0"} + }' + wait_cluster_consistency "$cluster" 3 2 + wait_for_sts_generation "$cluster-pxc" "3" "1" + desc "compare k8s objects" + compare_kubectl service/$cluster-pxc "-1170" + compare_kubectl service/$cluster-proxysql "-1170" + compare_kubectl statefulset/$cluster-pxc "-1170" + compare_kubectl statefulset/$cluster-proxysql "-1170" + destroy "${namespace}" desc "test passed" } diff --git a/version/version.go b/version/version.go index 3e5b1d8345..edc8424e7e 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ package version var ( - Version = "1.16.0" + Version = "1.17.0" ) From 28e4de4dfaa447c4985af21ae25347118d0b3c43 Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Mon, 23 Dec 2024 09:27:54 +0200 Subject: [PATCH 2/4] Add delete .spec.crVersion for compare in functions and in tls-issue-self diffs --- e2e-tests/functions | 1 + e2e-tests/tls-issue-self/compare/pxc_some-name-enabled.yml | 1 - e2e-tests/tls-issue-self/compare/pxc_some-name.yml | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e-tests/functions b/e2e-tests/functions index 93bdda43f9..ec9549928f 100755 --- a/e2e-tests/functions +++ b/e2e-tests/functions @@ -496,6 +496,7 @@ compare_kubectl() { (.. | select(tag == "!!str")) |= sub("'$namespace'", "namespace") | (.. | select(tag == "!!str")) |= sub("kube-api-access-.*", "kube-api-access") | del(.. | select(has("annotations")).annotations | select(length==0)) | + del(.spec.crVersion) | del(.. | select(.[] == "percona-xtradb-cluster-operator-workload-token*"))' - >${new_result} diff -u ${expected_result} ${new_result} diff --git a/e2e-tests/tls-issue-self/compare/pxc_some-name-enabled.yml b/e2e-tests/tls-issue-self/compare/pxc_some-name-enabled.yml index 0124f49796..264d3c94f3 100644 --- a/e2e-tests/tls-issue-self/compare/pxc_some-name-enabled.yml +++ b/e2e-tests/tls-issue-self/compare/pxc_some-name-enabled.yml @@ -35,7 +35,6 @@ spec: resources: requests: storage: 1Gi - crVersion: 1.16.0 logcollector: enabled: true pmm: diff --git a/e2e-tests/tls-issue-self/compare/pxc_some-name.yml b/e2e-tests/tls-issue-self/compare/pxc_some-name.yml index 5e96b63042..5bbf5a8c75 100644 --- a/e2e-tests/tls-issue-self/compare/pxc_some-name.yml +++ b/e2e-tests/tls-issue-self/compare/pxc_some-name.yml @@ -35,7 +35,6 @@ spec: resources: requests: storage: 1Gi - crVersion: 1.16.0 logcollector: enabled: true pmm: From f5e5b852d5d79691840f22a57fa74a217eba6da8 Mon Sep 17 00:00:00 2001 From: Vlad Gusev Date: Mon, 23 Dec 2024 11:14:18 +0200 Subject: [PATCH 3/4] fix: don't add the storage name twice to the scheduled backup name Don't add the storage name twice to the scheduled backup name Adding a storage name twice might make a job name longer than 63 characters and break backup creation --- pkg/naming/backup.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkg/naming/backup.go b/pkg/naming/backup.go index ec7957d5d6..c7e876d03e 100644 --- a/pkg/naming/backup.go +++ b/pkg/naming/backup.go @@ -52,23 +52,22 @@ func trimJobName(name string) string { } func ScheduledBackupName(crName, storageName, schedule string) string { - result := "cron-" + result := "cron" if len(crName) > 16 { - result += crName[:16] + result += "-" + crName[:16] } else { - result += crName + result += "-" + crName } if len(storageName) > 16 { - result += storageName[:16] + result += "-" + storageName[:16] } else { - result += storageName + 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 += "-" + 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 } From 16fbe8e12b9b674bbb5e816e1652086f5ea2a522 Mon Sep 17 00:00:00 2001 From: Eleonora Zinchenko Date: Mon, 23 Dec 2024 14:13:10 +0200 Subject: [PATCH 4/4] Add annotations for .spec.volumeClaimTemplate and clean up k127 for proxies tests --- ...atefulset_upgrade-haproxy-haproxy-k127.yml | 202 ------------- .../statefulset_upgrade-haproxy-haproxy.yml | 13 +- ...tatefulset_upgrade-haproxy-pxc-k127-oc.yml | 279 ----------------- .../statefulset_upgrade-haproxy-pxc-k127.yml | 280 ------------------ .../statefulset_upgrade-haproxy-pxc-oc.yml | 9 + .../statefulset_upgrade-haproxy-pxc.yml | 9 + ...lset_upgrade-proxysql-proxysql-k127-oc.yml | 235 --------------- ...efulset_upgrade-proxysql-proxysql-k127.yml | 236 --------------- ...atefulset_upgrade-proxysql-proxysql-oc.yml | 9 + .../statefulset_upgrade-proxysql-proxysql.yml | 19 +- ...atefulset_upgrade-proxysql-pxc-k127-oc.yml | 279 ----------------- .../statefulset_upgrade-proxysql-pxc-k127.yml | 280 ------------------ .../statefulset_upgrade-proxysql-pxc-oc.yml | 9 + .../statefulset_upgrade-proxysql-pxc.yml | 9 + 14 files changed, 75 insertions(+), 1793 deletions(-) delete mode 100644 e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy-k127.yml delete mode 100644 e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127-oc.yml delete mode 100644 e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127.yml delete mode 100644 e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127-oc.yml delete mode 100644 e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127.yml delete mode 100644 e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127-oc.yml delete mode 100644 e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127.yml diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy-k127.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy-k127.yml deleted file mode 100644 index 8691d5d175..0000000000 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy-k127.yml +++ /dev/null @@ -1,202 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-haproxy-haproxy - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-haproxy -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: haproxy - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-haproxy-haproxy - template: - metadata: - labels: - app.kubernetes.io/component: haproxy - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: haproxy - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - args: - - haproxy - command: - - /opt/percona/haproxy-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-haproxy-pxc - - name: LIVENESS_CHECK_TIMEOUT - value: "5" - - name: READINESS_CHECK_TIMEOUT - value: "1" - envFrom: - - secretRef: - name: upgrade-haproxy-env-vars-haproxy - optional: true - imagePullPolicy: Always - livenessProbe: - exec: - command: - - /opt/percona/haproxy_liveness_check.sh - failureThreshold: 4 - initialDelaySeconds: 60 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 5 - name: haproxy - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 3307 - name: mysql-replicas - protocol: TCP - - containerPort: 3309 - name: proxy-protocol - protocol: TCP - - containerPort: 33062 - name: mysql-admin - protocol: TCP - - containerPort: 33060 - name: mysqlx - protocol: TCP - readinessProbe: - exec: - command: - - /opt/percona/haproxy_readiness_check.sh - failureThreshold: 3 - initialDelaySeconds: 15 - periodSeconds: 5 - successThreshold: 1 - timeoutSeconds: 1 - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /etc/haproxy-custom/ - name: haproxy-custom - - mountPath: /etc/haproxy/pxc - name: haproxy-auto - - mountPath: /opt/percona - name: bin - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/mysql/haproxy-env-secret - name: upgrade-haproxy-env-vars-haproxy - - args: - - /opt/percona/peer-list - - -on-change=/opt/percona/haproxy_add_pxc_nodes.sh - - -service=$(PXC_SERVICE) - command: - - /opt/percona/haproxy-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-haproxy-pxc - - name: REPLICAS_SVC_ONLY_READERS - value: "false" - envFrom: - - secretRef: - name: upgrade-haproxy-env-vars-haproxy - optional: true - imagePullPolicy: Always - name: pxc-monit - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /etc/haproxy-custom/ - name: haproxy-custom - - mountPath: /etc/haproxy/pxc - name: haproxy-auto - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/mysql/haproxy-env-secret - name: upgrade-haproxy-env-vars-haproxy - - mountPath: /opt/percona - name: bin - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: bin - - command: - - /haproxy-init-entrypoint.sh - imagePullPolicy: Always - name: haproxy-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - restartPolicy: Always - schedulerName: default-scheduler - securityContext: {} - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 30 - volumes: - - configMap: - defaultMode: 420 - name: upgrade-haproxy-haproxy - optional: true - name: haproxy-custom - - emptyDir: {} - name: haproxy-auto - - name: mysql-users-secret-file - secret: - defaultMode: 420 - optional: false - secretName: internal-upgrade-haproxy - - name: upgrade-haproxy-env-vars-haproxy - secret: - defaultMode: 420 - optional: true - secretName: upgrade-haproxy-env-vars-haproxy - - emptyDir: {} - name: bin - updateStrategy: - rollingUpdate: - partition: 0 - type: RollingUpdate diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy.yml index b5e6f0f05d..8691d5d175 100644 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy.yml +++ b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-haproxy.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-haproxy spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -40,7 +43,11 @@ spec: app.kubernetes.io/part-of: percona-xtradb-cluster topologyKey: kubernetes.io/hostname containers: - - env: + - args: + - haproxy + command: + - /opt/percona/haproxy-entrypoint.sh + env: - name: PXC_SERVICE value: upgrade-haproxy-pxc - name: LIVENESS_CHECK_TIMEOUT @@ -108,6 +115,8 @@ spec: - /opt/percona/peer-list - -on-change=/opt/percona/haproxy_add_pxc_nodes.sh - -service=$(PXC_SERVICE) + command: + - /opt/percona/haproxy-entrypoint.sh env: - name: PXC_SERVICE value: upgrade-haproxy-pxc @@ -131,6 +140,8 @@ spec: name: mysql-users-secret-file - mountPath: /etc/mysql/haproxy-env-secret name: upgrade-haproxy-env-vars-haproxy + - mountPath: /opt/percona + name: bin dnsPolicy: ClusterFirst initContainers: - command: diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127-oc.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127-oc.yml deleted file mode 100644 index 73b8157e44..0000000000 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127-oc.yml +++ /dev/null @@ -1,279 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-haproxy-pxc - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-haproxy -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-haproxy-pxc - template: - metadata: - labels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - env: - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: POD_NAMESPASE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - envFrom: - - secretRef: - name: upgrade-haproxy-log-collector - optional: true - imagePullPolicy: Always - name: logs - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - logrotate - env: - - name: SERVICE_TYPE - value: mysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-haproxy - imagePullPolicy: Always - name: logrotate - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - mysqld - command: - - /var/lib/mysql/pxc-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-haproxy-pxc-unready - - name: MONITOR_HOST - value: '%' - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root - name: internal-upgrade-haproxy - - name: XTRABACKUP_PASSWORD - valueFrom: - secretKeyRef: - key: xtrabackup - name: internal-upgrade-haproxy - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-haproxy - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: IS_LOGCOLLECTOR - value: "yes" - - name: OPERATOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-haproxy - - name: LIVENESS_CHECK_TIMEOUT - value: "5" - - name: READINESS_CHECK_TIMEOUT - value: "15" - - name: DEFAULT_AUTHENTICATION_PLUGIN - value: caching_sha2_password - - name: MYSQL_NOTIFY_SOCKET - value: /var/lib/mysql/notify.sock - - name: MYSQL_STATE_FILE - value: /var/lib/mysql/mysql.state - envFrom: - - secretRef: - name: upgrade-haproxy-env-vars-pxc - optional: true - imagePullPolicy: Always - livenessProbe: - exec: - command: - - /var/lib/mysql/liveness-check.sh - failureThreshold: 3 - initialDelaySeconds: 300 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - name: pxc - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 4444 - name: sst - protocol: TCP - - containerPort: 4567 - name: write-set - protocol: TCP - - containerPort: 4568 - name: ist - protocol: TCP - - containerPort: 33062 - name: mysql-admin - protocol: TCP - - containerPort: 33060 - name: mysqlx - protocol: TCP - readinessProbe: - exec: - command: - - /var/lib/mysql/readiness-check.sh - failureThreshold: 5 - initialDelaySeconds: 15 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 15 - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - mountPath: /etc/percona-xtradb-cluster.conf.d - name: config - - mountPath: /tmp - name: tmp - - mountPath: /etc/mysql/ssl - name: ssl - - mountPath: /etc/mysql/ssl-internal - name: ssl-internal - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/my.cnf.d - name: auto-config - - mountPath: /etc/mysql/vault-keyring-secret - name: vault-keyring-secret - - mountPath: /etc/mysql/init-file - name: mysql-init-file - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 600 - volumes: - - emptyDir: {} - name: tmp - - configMap: - defaultMode: 420 - name: upgrade-haproxy-pxc - optional: true - name: config - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - configMap: - defaultMode: 420 - name: auto-upgrade-haproxy-pxc - optional: true - name: auto-config - - name: vault-keyring-secret - secret: - defaultMode: 420 - optional: true - secretName: some-name-vault - - name: mysql-users-secret-file - secret: - defaultMode: 420 - optional: false - secretName: internal-upgrade-haproxy - - name: mysql-init-file - secret: - defaultMode: 420 - optional: true - secretName: upgrade-haproxy-mysql-init - updateStrategy: - type: OnDelete - volumeClaimTemplates: - - metadata: - name: datadir - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 6G - status: - phase: Pending diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127.yml deleted file mode 100644 index 4e643ca349..0000000000 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-k127.yml +++ /dev/null @@ -1,280 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-haproxy-pxc - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-haproxy -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-haproxy-pxc - template: - metadata: - labels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - env: - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: POD_NAMESPASE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - envFrom: - - secretRef: - name: upgrade-haproxy-log-collector - optional: true - imagePullPolicy: Always - name: logs - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - logrotate - env: - - name: SERVICE_TYPE - value: mysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-haproxy - imagePullPolicy: Always - name: logrotate - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - mysqld - command: - - /var/lib/mysql/pxc-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-haproxy-pxc-unready - - name: MONITOR_HOST - value: '%' - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root - name: internal-upgrade-haproxy - - name: XTRABACKUP_PASSWORD - valueFrom: - secretKeyRef: - key: xtrabackup - name: internal-upgrade-haproxy - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-haproxy - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: IS_LOGCOLLECTOR - value: "yes" - - name: OPERATOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-haproxy - - name: LIVENESS_CHECK_TIMEOUT - value: "5" - - name: READINESS_CHECK_TIMEOUT - value: "15" - - name: DEFAULT_AUTHENTICATION_PLUGIN - value: caching_sha2_password - - name: MYSQL_NOTIFY_SOCKET - value: /var/lib/mysql/notify.sock - - name: MYSQL_STATE_FILE - value: /var/lib/mysql/mysql.state - envFrom: - - secretRef: - name: upgrade-haproxy-env-vars-pxc - optional: true - imagePullPolicy: Always - livenessProbe: - exec: - command: - - /var/lib/mysql/liveness-check.sh - failureThreshold: 3 - initialDelaySeconds: 300 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - name: pxc - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 4444 - name: sst - protocol: TCP - - containerPort: 4567 - name: write-set - protocol: TCP - - containerPort: 4568 - name: ist - protocol: TCP - - containerPort: 33062 - name: mysql-admin - protocol: TCP - - containerPort: 33060 - name: mysqlx - protocol: TCP - readinessProbe: - exec: - command: - - /var/lib/mysql/readiness-check.sh - failureThreshold: 5 - initialDelaySeconds: 15 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 15 - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - mountPath: /etc/percona-xtradb-cluster.conf.d - name: config - - mountPath: /tmp - name: tmp - - mountPath: /etc/mysql/ssl - name: ssl - - mountPath: /etc/mysql/ssl-internal - name: ssl-internal - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/my.cnf.d - name: auto-config - - mountPath: /etc/mysql/vault-keyring-secret - name: vault-keyring-secret - - mountPath: /etc/mysql/init-file - name: mysql-init-file - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - fsGroup: 1001 - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 600 - volumes: - - emptyDir: {} - name: tmp - - configMap: - defaultMode: 420 - name: upgrade-haproxy-pxc - optional: true - name: config - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - configMap: - defaultMode: 420 - name: auto-upgrade-haproxy-pxc - optional: true - name: auto-config - - name: vault-keyring-secret - secret: - defaultMode: 420 - optional: true - secretName: some-name-vault - - name: mysql-users-secret-file - secret: - defaultMode: 420 - optional: false - secretName: internal-upgrade-haproxy - - name: mysql-init-file - secret: - defaultMode: 420 - optional: true - secretName: upgrade-haproxy-mysql-init - updateStrategy: - type: OnDelete - volumeClaimTemplates: - - metadata: - name: datadir - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 6G - status: - phase: Pending diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-oc.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-oc.yml index e5388ae8d8..8f1c3a0ebf 100644 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-oc.yml +++ b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc-oc.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-haproxy spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -265,6 +268,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: upgrade-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: datadir spec: accessModes: diff --git a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc.yml b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc.yml index f637509a77..d674ed97e8 100644 --- a/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc.yml +++ b/e2e-tests/upgrade-haproxy/compare/statefulset_upgrade-haproxy-pxc.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-haproxy spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -266,6 +269,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: upgrade-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: datadir spec: accessModes: diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127-oc.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127-oc.yml deleted file mode 100644 index 64121f4e1d..0000000000 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127-oc.yml +++ /dev/null @@ -1,235 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-proxysql-proxysql - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-proxysql -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-proxysql-proxysql-unready - template: - metadata: - labels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - args: - - proxysql - - -f - - -c - - /etc/proxysql/proxysql.cnf - - --reload - command: - - /opt/percona/proxysql-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: proxysql - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 6032 - name: proxyadm - protocol: TCP - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/proxysql - name: proxydata - - mountPath: /etc/proxysql/ssl - name: ssl - - mountPath: /etc/proxysql/ssl-internal - name: ssl-internal - - mountPath: /opt/percona - name: bin - - args: - - /opt/percona/peer-list - - -on-change=/opt/percona/proxysql_add_pxc_nodes.sh - - -service=$(PXC_SERVICE) - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: pxc-monit - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - - args: - - /opt/percona/peer-list - - -on-change=/opt/percona/proxysql_add_proxysql_nodes.sh - - -service=$(PROXYSQL_SERVICE) - env: - - name: PROXYSQL_SERVICE - value: upgrade-proxysql-proxysql-unready - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: proxysql-monit - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: bin - - command: - - /proxysql-init-entrypoint.sh - imagePullPolicy: Always - name: proxysql-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 30 - volumes: - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - emptyDir: {} - name: bin - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: proxydata - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2G - status: - phase: Pending diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127.yml deleted file mode 100644 index 85ba99bea1..0000000000 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-k127.yml +++ /dev/null @@ -1,236 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-proxysql-proxysql - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-proxysql -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-proxysql-proxysql-unready - template: - metadata: - labels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: proxysql - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - args: - - proxysql - - -f - - -c - - /etc/proxysql/proxysql.cnf - - --reload - command: - - /opt/percona/proxysql-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: proxysql - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 6032 - name: proxyadm - protocol: TCP - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/proxysql - name: proxydata - - mountPath: /etc/proxysql/ssl - name: ssl - - mountPath: /etc/proxysql/ssl-internal - name: ssl-internal - - mountPath: /opt/percona - name: bin - - args: - - /opt/percona/peer-list - - -on-change=/opt/percona/proxysql_add_pxc_nodes.sh - - -service=$(PXC_SERVICE) - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: pxc-monit - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - - args: - - /opt/percona/peer-list - - -on-change=/opt/percona/proxysql_add_proxysql_nodes.sh - - -service=$(PROXYSQL_SERVICE) - env: - - name: PROXYSQL_SERVICE - value: upgrade-proxysql-proxysql-unready - - name: OPERATOR_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: PROXY_ADMIN_USER - value: proxyadmin - - name: PROXY_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: proxyadmin - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-proxysql - optional: true - imagePullPolicy: Always - name: proxysql-monit - resources: {} - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: bin - - command: - - /proxysql-init-entrypoint.sh - imagePullPolicy: Always - name: proxysql-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /opt/percona - name: bin - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - fsGroup: 1001 - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 30 - volumes: - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - emptyDir: {} - name: bin - updateStrategy: - type: RollingUpdate - volumeClaimTemplates: - - metadata: - name: proxydata - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 2G - status: - phase: Pending diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-oc.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-oc.yml index 4ad887b1ba..2507201037 100644 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-oc.yml +++ b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql-oc.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-proxysql spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -221,6 +224,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: upgrade-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: proxydata spec: accessModes: diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql.yml index 998fb3a571..35250906a3 100644 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql.yml +++ b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-proxysql.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-proxysql spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -40,7 +43,15 @@ spec: app.kubernetes.io/part-of: percona-xtradb-cluster topologyKey: kubernetes.io/hostname containers: - - env: + - args: + - proxysql + - -f + - -c + - /etc/proxysql/proxysql.cnf + - --reload + command: + - /opt/percona/proxysql-entrypoint.sh + env: - name: PXC_SERVICE value: upgrade-proxysql-pxc - name: OPERATOR_PASSWORD @@ -214,6 +225,12 @@ spec: type: RollingUpdate volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: proxysql + app.kubernetes.io/instance: upgrade-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: proxydata spec: accessModes: diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127-oc.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127-oc.yml deleted file mode 100644 index eae6955b57..0000000000 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127-oc.yml +++ /dev/null @@ -1,279 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-proxysql-pxc - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-proxysql -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-proxysql-pxc - template: - metadata: - labels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - env: - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: POD_NAMESPASE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - envFrom: - - secretRef: - name: upgrade-proxysql-log-collector - optional: true - imagePullPolicy: Always - name: logs - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - logrotate - env: - - name: SERVICE_TYPE - value: mysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - imagePullPolicy: Always - name: logrotate - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - mysqld - command: - - /var/lib/mysql/pxc-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc-unready - - name: MONITOR_HOST - value: '%' - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root - name: internal-upgrade-proxysql - - name: XTRABACKUP_PASSWORD - valueFrom: - secretKeyRef: - key: xtrabackup - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: IS_LOGCOLLECTOR - value: "yes" - - name: OPERATOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: LIVENESS_CHECK_TIMEOUT - value: "5" - - name: READINESS_CHECK_TIMEOUT - value: "15" - - name: DEFAULT_AUTHENTICATION_PLUGIN - value: mysql_native_password - - name: MYSQL_NOTIFY_SOCKET - value: /var/lib/mysql/notify.sock - - name: MYSQL_STATE_FILE - value: /var/lib/mysql/mysql.state - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-pxc - optional: true - imagePullPolicy: Always - livenessProbe: - exec: - command: - - /var/lib/mysql/liveness-check.sh - failureThreshold: 3 - initialDelaySeconds: 300 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - name: pxc - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 4444 - name: sst - protocol: TCP - - containerPort: 4567 - name: write-set - protocol: TCP - - containerPort: 4568 - name: ist - protocol: TCP - - containerPort: 33062 - name: mysql-admin - protocol: TCP - - containerPort: 33060 - name: mysqlx - protocol: TCP - readinessProbe: - exec: - command: - - /var/lib/mysql/readiness-check.sh - failureThreshold: 5 - initialDelaySeconds: 15 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 15 - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - mountPath: /etc/percona-xtradb-cluster.conf.d - name: config - - mountPath: /tmp - name: tmp - - mountPath: /etc/mysql/ssl - name: ssl - - mountPath: /etc/mysql/ssl-internal - name: ssl-internal - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/my.cnf.d - name: auto-config - - mountPath: /etc/mysql/vault-keyring-secret - name: vault-keyring-secret - - mountPath: /etc/mysql/init-file - name: mysql-init-file - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 600 - volumes: - - emptyDir: {} - name: tmp - - configMap: - defaultMode: 420 - name: upgrade-proxysql-pxc - optional: true - name: config - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - configMap: - defaultMode: 420 - name: auto-upgrade-proxysql-pxc - optional: true - name: auto-config - - name: vault-keyring-secret - secret: - defaultMode: 420 - optional: true - secretName: some-name-vault - - name: mysql-users-secret-file - secret: - defaultMode: 420 - optional: false - secretName: internal-upgrade-proxysql - - name: mysql-init-file - secret: - defaultMode: 420 - optional: true - secretName: upgrade-proxysql-mysql-init - updateStrategy: - type: OnDelete - volumeClaimTemplates: - - metadata: - name: datadir - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 6G - status: - phase: Pending diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127.yml deleted file mode 100644 index bcc4bb49ba..0000000000 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-k127.yml +++ /dev/null @@ -1,280 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - generation: 2 - name: upgrade-proxysql-pxc - ownerReferences: - - controller: true - kind: PerconaXtraDBCluster - name: upgrade-proxysql -spec: - persistentVolumeClaimRetentionPolicy: - whenDeleted: Retain - whenScaled: Retain - podManagementPolicy: OrderedReady - replicas: 3 - revisionHistoryLimit: 10 - selector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - serviceName: upgrade-proxysql-pxc - template: - metadata: - labels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - spec: - affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchLabels: - app.kubernetes.io/component: pxc - app.kubernetes.io/instance: upgrade-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 - topologyKey: kubernetes.io/hostname - containers: - - env: - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: POD_NAMESPASE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - envFrom: - - secretRef: - name: upgrade-proxysql-log-collector - optional: true - imagePullPolicy: Always - name: logs - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - logrotate - env: - - name: SERVICE_TYPE - value: mysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - imagePullPolicy: Always - name: logrotate - resources: - requests: - cpu: 200m - memory: 100M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - args: - - mysqld - command: - - /var/lib/mysql/pxc-entrypoint.sh - env: - - name: PXC_SERVICE - value: upgrade-proxysql-pxc-unready - - name: MONITOR_HOST - value: '%' - - name: MYSQL_ROOT_PASSWORD - valueFrom: - secretKeyRef: - key: root - name: internal-upgrade-proxysql - - name: XTRABACKUP_PASSWORD - valueFrom: - secretKeyRef: - key: xtrabackup - name: internal-upgrade-proxysql - - name: MONITOR_PASSWORD - valueFrom: - secretKeyRef: - key: monitor - name: internal-upgrade-proxysql - - name: LOG_DATA_DIR - value: /var/lib/mysql - - name: IS_LOGCOLLECTOR - value: "yes" - - name: OPERATOR_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: operator - name: internal-upgrade-proxysql - - name: LIVENESS_CHECK_TIMEOUT - value: "5" - - name: READINESS_CHECK_TIMEOUT - value: "15" - - name: DEFAULT_AUTHENTICATION_PLUGIN - value: mysql_native_password - - name: MYSQL_NOTIFY_SOCKET - value: /var/lib/mysql/notify.sock - - name: MYSQL_STATE_FILE - value: /var/lib/mysql/mysql.state - envFrom: - - secretRef: - name: upgrade-proxysql-env-vars-pxc - optional: true - imagePullPolicy: Always - livenessProbe: - exec: - command: - - /var/lib/mysql/liveness-check.sh - failureThreshold: 3 - initialDelaySeconds: 300 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 5 - name: pxc - ports: - - containerPort: 3306 - name: mysql - protocol: TCP - - containerPort: 4444 - name: sst - protocol: TCP - - containerPort: 4567 - name: write-set - protocol: TCP - - containerPort: 4568 - name: ist - protocol: TCP - - containerPort: 33062 - name: mysql-admin - protocol: TCP - - containerPort: 33060 - name: mysqlx - protocol: TCP - readinessProbe: - exec: - command: - - /var/lib/mysql/readiness-check.sh - failureThreshold: 5 - initialDelaySeconds: 15 - periodSeconds: 30 - successThreshold: 1 - timeoutSeconds: 15 - resources: - requests: - cpu: 600m - memory: 1G - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - - mountPath: /etc/percona-xtradb-cluster.conf.d - name: config - - mountPath: /tmp - name: tmp - - mountPath: /etc/mysql/ssl - name: ssl - - mountPath: /etc/mysql/ssl-internal - name: ssl-internal - - mountPath: /etc/mysql/mysql-users-secret - name: mysql-users-secret-file - - mountPath: /etc/my.cnf.d - name: auto-config - - mountPath: /etc/mysql/vault-keyring-secret - name: vault-keyring-secret - - mountPath: /etc/mysql/init-file - name: mysql-init-file - dnsPolicy: ClusterFirst - initContainers: - - command: - - /pxc-init-entrypoint.sh - imagePullPolicy: Always - name: pxc-init - resources: - limits: - cpu: 50m - memory: 50M - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - volumeMounts: - - mountPath: /var/lib/mysql - name: datadir - restartPolicy: Always - schedulerName: default-scheduler - securityContext: - fsGroup: 1001 - supplementalGroups: - - 1001 - serviceAccount: default - serviceAccountName: default - terminationGracePeriodSeconds: 600 - volumes: - - emptyDir: {} - name: tmp - - configMap: - defaultMode: 420 - name: upgrade-proxysql-pxc - optional: true - name: config - - name: ssl-internal - secret: - defaultMode: 420 - optional: true - secretName: some-name-ssl-internal - - name: ssl - secret: - defaultMode: 420 - optional: false - secretName: some-name-ssl - - configMap: - defaultMode: 420 - name: auto-upgrade-proxysql-pxc - optional: true - name: auto-config - - name: vault-keyring-secret - secret: - defaultMode: 420 - optional: true - secretName: some-name-vault - - name: mysql-users-secret-file - secret: - defaultMode: 420 - optional: false - secretName: internal-upgrade-proxysql - - name: mysql-init-file - secret: - defaultMode: 420 - optional: true - secretName: upgrade-proxysql-mysql-init - updateStrategy: - type: OnDelete - volumeClaimTemplates: - - metadata: - name: datadir - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 6G - status: - phase: Pending diff --git a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-oc.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-oc.yml index 717caf26cd..8d71c22e54 100644 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-oc.yml +++ b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc-oc.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-proxysql spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -265,6 +268,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: upgrade-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/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc.yml b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc.yml index 7c9b8a5929..925167d358 100644 --- a/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc.yml +++ b/e2e-tests/upgrade-proxysql/compare/statefulset_upgrade-proxysql-pxc.yml @@ -8,6 +8,9 @@ metadata: kind: PerconaXtraDBCluster name: upgrade-proxysql spec: + persistentVolumeClaimRetentionPolicy: + whenDeleted: Retain + whenScaled: Retain podManagementPolicy: OrderedReady replicas: 3 revisionHistoryLimit: 10 @@ -266,6 +269,12 @@ spec: type: OnDelete volumeClaimTemplates: - metadata: + labels: + app.kubernetes.io/component: pxc + app.kubernetes.io/instance: upgrade-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: