++ echo 'Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/logs/ignore-labels-annotations.log' Log: /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/logs/ignore-labels-annotations.log ++ '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/conf/cloud-secret.yml ']' ++ SKIP_BACKUPS_TO_AWS_GCP_AZURE= ++ oc get projects ++ kubectl get nodes ++ grep '^minikube' +++ kubectl version -o json +++ jq -r .serverVersion.gitVersion +++ grep -eks- Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 ++ '[' ']' ++ EKS=0 +++ kubectl version -o json +++ jq -r .serverVersion.gitVersion +++ grep gke Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 ++ '[' v1.33.11-gke.1074000 ']' ++ GKE=1 +++ kubectl version -o json +++ jq -r '.serverVersion.major + "." + .serverVersion.minor' +++ /usr/sbin/sed -r 's/[^0-9.]+//g' Warning: version difference between client (1.36) and server (1.33) exceeds the supported minor version skew of +/-1 ++ KUBE_VERSION=1.33 + create_infra ignore-labels-annotations-5248 + local ns=ignore-labels-annotations-5248 + echo ignore-labels-annotations-5248 + [[ 0 == 1 ]] + '[' -n psmdb-operator ']' + create_namespace psmdb-operator + local namespace=psmdb-operator + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ awk '{print $1}' ++ grep chaos-mesh + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' + xargs kubectl delete ns ++ mktemp + '[' -n '' ']' + desc 'cleaned up old namespaces psmdb-operator' + local LAST_OUT=/tmp/tmp.WwC3wyD5lL + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin delete namespace psmdb-operator --ignore-not-found ++ mktemp ++ mktemp + local LAST_ERR=/tmp/tmp.zQEyDgdztq + local exit_status=0 + local timeout=4 + local LAST_OUT=/tmp/tmp.Y28l7TQHoj ++ seq 0 2 ++ mktemp + for i in $(seq 0 2) + set +e + kubectl get ns + local LAST_ERR=/tmp/tmp.AHmssv224w + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl delete namespace psmdb-operator --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.WwC3wyD5lL + cat /tmp/tmp.zQEyDgdztq + rm /tmp/tmp.WwC3wyD5lL /tmp/tmp.zQEyDgdztq + return 0 namespace "demand-backup-sharded-8756" deleted + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Y28l7TQHoj namespace "psmdb-operator" deleted + cat /tmp/tmp.AHmssv224w + rm /tmp/tmp.Y28l7TQHoj /tmp/tmp.AHmssv224w + return 0 + kubectl_bin wait --for=delete namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.FlQVrULnzh ++ mktemp + local LAST_ERR=/tmp/tmp.LBtCUfYxDM + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl wait --for=delete namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FlQVrULnzh + cat /tmp/tmp.LBtCUfYxDM + rm /tmp/tmp.FlQVrULnzh /tmp/tmp.LBtCUfYxDM + return 0 + desc 'create namespace psmdb-operator' + set +o xtrace ----------------------------------------------------------------------------------- create namespace psmdb-operator ----------------------------------------------------------------------------------- + kubectl_bin create namespace psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.OXx57iA2S9 ++ mktemp + local LAST_ERR=/tmp/tmp.KRHabRtz0Y + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl create namespace psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.OXx57iA2S9 namespace/psmdb-operator created + cat /tmp/tmp.KRHabRtz0Y + rm /tmp/tmp.OXx57iA2S9 /tmp/tmp.KRHabRtz0Y + return 0 + set_kube_ctx psmdb-operator + local namespace=psmdb-operator ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.sAcsReVeTQ +++ mktemp ++ local LAST_ERR=/tmp/tmp.ctU50cWstf ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.sAcsReVeTQ ++ cat /tmp/tmp.ctU50cWstf ++ rm /tmp/tmp.sAcsReVeTQ /tmp/tmp.ctU50cWstf ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3 --namespace=psmdb-operator ++ mktemp + local LAST_OUT=/tmp/tmp.uM8icKcndN ++ mktemp + local LAST_ERR=/tmp/tmp.WsFO2Od532 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3 --namespace=psmdb-operator + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.uM8icKcndN Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3" modified. + cat /tmp/tmp.WsFO2Od532 + rm /tmp/tmp.uM8icKcndN /tmp/tmp.WsFO2Od532 + return 0 + deploy_operator + desc 'start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2058-fb8cc7187' + set +o xtrace ----------------------------------------------------------------------------------- start PSMDB operator: docker.io/perconalab/percona-server-mongodb-operator:PR-2058-fb8cc7187 ----------------------------------------------------------------------------------- + local cr_file + '[' -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/conf/crd.yaml ']' + cr_file=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/deploy/crd.yaml + kubectl_bin apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/deploy/crd.yaml ++ mktemp + local LAST_OUT=/tmp/tmp.2cxGWYW70U ++ mktemp + local LAST_ERR=/tmp/tmp.Z7kha3PyzI + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply --server-side --force-conflicts -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/deploy/crd.yaml + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.2cxGWYW70U customresourcedefinition.apiextensions.k8s.io/perconaservermongodbbackups.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbrestores.psmdb.percona.com serverside-applied customresourcedefinition.apiextensions.k8s.io/perconaservermongodbs.psmdb.percona.com serverside-applied + cat /tmp/tmp.Z7kha3PyzI + rm /tmp/tmp.2cxGWYW70U /tmp/tmp.Z7kha3PyzI + return 0 + '[' -n psmdb-operator ']' + apply_rbac cw-rbac + local operator_namespace=psmdb-operator + local rbac=cw-rbac + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/deploy/cw-rbac.yaml + sed -e 's^namespace: .*^namespace: psmdb-operator^' + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.u4FxVxF4T3 ++ mktemp + local LAST_ERR=/tmp/tmp.44Sx47Bu8b + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.u4FxVxF4T3 clusterrole.rbac.authorization.k8s.io/percona-server-mongodb-operator unchanged serviceaccount/percona-server-mongodb-operator created clusterrolebinding.rbac.authorization.k8s.io/service-account-percona-server-mongodb-operator unchanged + cat /tmp/tmp.44Sx47Bu8b + rm /tmp/tmp.u4FxVxF4T3 /tmp/tmp.44Sx47Bu8b + return 0 + yq eval $'\n\t\t\t(.spec.template.spec.containers[].image = "docker.io/perconalab/percona-server-mongodb-operator:PR-2058-fb8cc7187") |\n\t\t\t((.. | select(.[] == "DISABLE_TELEMETRY")) |= .value="true") |\n\t\t\t((.. | select(.[] == "LOG_LEVEL")) |= .value="DEBUG")' /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/deploy/cw-operator.yaml + kubectl_bin apply -n psmdb-operator -f - ++ mktemp + local LAST_OUT=/tmp/tmp.121VuGmhiQ ++ mktemp + local LAST_ERR=/tmp/tmp.BSoD7KshI9 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply -n psmdb-operator -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.121VuGmhiQ deployment.apps/percona-server-mongodb-operator created + cat /tmp/tmp.BSoD7KshI9 + rm /tmp/tmp.121VuGmhiQ /tmp/tmp.BSoD7KshI9 + return 0 + sleep 20 ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.Yewc6noM1X +++ mktemp ++ local LAST_ERR=/tmp/tmp.L165hDFeh5 ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.Yewc6noM1X ++ cat /tmp/tmp.L165hDFeh5 ++ rm /tmp/tmp.Yewc6noM1X /tmp/tmp.L165hDFeh5 ++ return 0 + wait_operator_pod percona-server-mongodb-operator-859f4bc6d7-ndl6h + local pod=percona-server-mongodb-operator-859f4bc6d7-ndl6h + set +o xtrace waiting for pod/percona-server-mongodb-operator-859f4bc6d7-ndl6h to be ready.OK + echo 'Print operator info from log' Print operator info from log + grep 'Manager starting up' ++ get_operator_pod ++ kubectl_bin get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator +++ mktemp ++ local LAST_OUT=/tmp/tmp.AvOw2uh4zD +++ mktemp ++ local LAST_ERR=/tmp/tmp.aQ8GkNiZEn ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get pods --selector=name=percona-server-mongodb-operator -o 'jsonpath={.items[].metadata.name}' -n psmdb-operator ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.AvOw2uh4zD ++ cat /tmp/tmp.aQ8GkNiZEn ++ rm /tmp/tmp.AvOw2uh4zD /tmp/tmp.aQ8GkNiZEn ++ return 0 + kubectl_bin logs -n psmdb-operator percona-server-mongodb-operator-859f4bc6d7-ndl6h ++ mktemp + local LAST_OUT=/tmp/tmp.edmwwDnFGD ++ mktemp + local LAST_ERR=/tmp/tmp.FKrKP1XPeL + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl logs -n psmdb-operator percona-server-mongodb-operator-859f4bc6d7-ndl6h + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.edmwwDnFGD + cat /tmp/tmp.FKrKP1XPeL + rm /tmp/tmp.edmwwDnFGD /tmp/tmp.FKrKP1XPeL + return 0 2026-06-09T09:14:09.253Z INFO setup Manager starting up {"gitCommit": "fb8cc718776dc8f9e011cd5f23fe48cf7f65143e", "gitBranch": "PR-2058-fb8cc7187", "buildTime": "", "goVersion": "go1.26.4", "os": "linux", "arch": "amd64"} + create_namespace ignore-labels-annotations-5248 + local namespace=ignore-labels-annotations-5248 + local skip_clean_namespace= + [[ 1 == 1 ]] + [[ -z '' ]] + destroy_chaos_mesh ++ helm list --all-namespaces --filter chaos-mesh ++ tail -n1 ++ awk '-F ' '{print $2}' ++ sed s/NAMESPACE// + local chaos_mesh_ns= + desc 'destroy chaos-mesh' + set +o xtrace ----------------------------------------------------------------------------------- destroy chaos-mesh ----------------------------------------------------------------------------------- + '[' -n '' ']' ++ kubectl get MutatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete MutatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl get ValidatingWebhookConfiguration ++ grep validate-auth ++ awk '{print $1}' + timeout 30 kubectl delete ValidatingWebhookConfiguration error: resource(s) were provided, but no name was specified + : ++ kubectl api-resources ++ awk '{print $1}' ++ grep chaos-mesh ++ kubectl get crd ++ grep chaos-mesh.org ++ awk '{print $1}' + timeout 30 kubectl delete crd error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrolebinding ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrolebinding error: resource(s) were provided, but no name was specified + : ++ kubectl get clusterrole ++ grep chaos-mesh ++ awk '{print $1}' + timeout 30 kubectl delete clusterrole error: resource(s) were provided, but no name was specified + : + desc 'cleaned up all old namespaces' + set +o xtrace ----------------------------------------------------------------------------------- cleaned up all old namespaces ----------------------------------------------------------------------------------- + kubectl_bin get ns + grep -E -v '^kube-|^default|Terminating|psmdb-operator|openshift|^gke-|^gmp-|^NAME' + awk '{print$1}' + '[' -n '' ']' + desc 'cleaned up old namespaces ignore-labels-annotations-5248' + xargs kubectl delete ns + set +o xtrace ----------------------------------------------------------------------------------- cleaned up old namespaces ignore-labels-annotations-5248 ----------------------------------------------------------------------------------- + kubectl_bin delete namespace ignore-labels-annotations-5248 --ignore-not-found ++ mktemp ++ mktemp + local LAST_OUT=/tmp/tmp.QXUv4jwfHr ++ mktemp + local LAST_OUT=/tmp/tmp.bZnAqLYsDZ ++ mktemp + local LAST_ERR=/tmp/tmp.9AJrGwCaEN + local exit_status=0 + local timeout=4 ++ seq 0 2 + local LAST_ERR=/tmp/tmp.lHJiixklCQ + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get ns + for i in $(seq 0 2) + set +e + kubectl delete namespace ignore-labels-annotations-5248 --ignore-not-found + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.QXUv4jwfHr + cat /tmp/tmp.9AJrGwCaEN + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.bZnAqLYsDZ + rm /tmp/tmp.QXUv4jwfHr /tmp/tmp.9AJrGwCaEN + cat /tmp/tmp.lHJiixklCQ + return 0 + rm /tmp/tmp.bZnAqLYsDZ /tmp/tmp.lHJiixklCQ + return 0 + kubectl_bin wait --for=delete namespace ignore-labels-annotations-5248 ++ mktemp + local LAST_OUT=/tmp/tmp.TlLnnyYuCg ++ mktemp + local LAST_ERR=/tmp/tmp.lqzH2toRoP + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl wait --for=delete namespace ignore-labels-annotations-5248 error: resource(s) were provided, but no name was specified + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TlLnnyYuCg + cat /tmp/tmp.lqzH2toRoP + rm /tmp/tmp.TlLnnyYuCg /tmp/tmp.lqzH2toRoP + return 0 + desc 'create namespace ignore-labels-annotations-5248' + set +o xtrace ----------------------------------------------------------------------------------- create namespace ignore-labels-annotations-5248 ----------------------------------------------------------------------------------- + kubectl_bin create namespace ignore-labels-annotations-5248 ++ mktemp + local LAST_OUT=/tmp/tmp.FCzny7Q6am ++ mktemp + local LAST_ERR=/tmp/tmp.tQIKJCldF4 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl create namespace ignore-labels-annotations-5248 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.FCzny7Q6am namespace/ignore-labels-annotations-5248 created + cat /tmp/tmp.tQIKJCldF4 + rm /tmp/tmp.FCzny7Q6am /tmp/tmp.tQIKJCldF4 + return 0 + set_kube_ctx ignore-labels-annotations-5248 + local namespace=ignore-labels-annotations-5248 ++ kubectl_bin config current-context +++ mktemp ++ local LAST_OUT=/tmp/tmp.UsquGvkdMb +++ mktemp ++ local LAST_ERR=/tmp/tmp.VxsZIPx1rc ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl config current-context ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.UsquGvkdMb ++ cat /tmp/tmp.VxsZIPx1rc ++ rm /tmp/tmp.UsquGvkdMb /tmp/tmp.VxsZIPx1rc ++ return 0 + kubectl_bin config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3 --namespace=ignore-labels-annotations-5248 ++ mktemp + local LAST_OUT=/tmp/tmp.n0UJXVMbj9 ++ mktemp + local LAST_ERR=/tmp/tmp.q1KnGVyVZw + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl config set-context gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3 --namespace=ignore-labels-annotations-5248 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.n0UJXVMbj9 Context "gke_cloud-dev-112233_us-central1-a_jen-psmdb-2058-fb8cc7187-17-cluster3" modified. + cat /tmp/tmp.q1KnGVyVZw + rm /tmp/tmp.n0UJXVMbj9 /tmp/tmp.q1KnGVyVZw + return 0 + cluster=some-name + apply_cluster /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/conf/some-name.yml + '[' -z '' ']' + cat_config /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/conf/some-name.yml + kubectl_bin apply -f - + yq eval '(.spec | select(has("pmm"))).pmm.image = "docker.io/percona/pmm-client:2.44.1-1"' + yq eval '(.spec | select(has("initImage"))).initImage = "docker.io/perconalab/percona-server-mongodb-operator:PR-2058-fb8cc7187"' + cat /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/conf/some-name.yml + yq eval '(.spec | select(has("backup"))).backup.image = "docker.io/perconalab/percona-server-mongodb-operator:main-backup"' ++ mktemp + yq eval '(.spec | select(.image == null)).image = "docker.io/perconalab/percona-server-mongodb-operator:main-mongod8.0"' + yq eval '.spec.upgradeOptions.apply="Never"' + /usr/sbin/sed -e s/NAME_SPACE/ignore-labels-annotations-5248/g + local LAST_OUT=/tmp/tmp.gC95JH96Rl ++ mktemp + local LAST_ERR=/tmp/tmp.9e6By62vDF + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl apply -f - + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.gC95JH96Rl perconaservermongodb.psmdb.percona.com/some-name created + cat /tmp/tmp.9e6By62vDF + rm /tmp/tmp.gC95JH96Rl /tmp/tmp.9e6By62vDF + return 0 + desc 'check if all 3 Pods started' + set +o xtrace ----------------------------------------------------------------------------------- check if all 3 Pods started ----------------------------------------------------------------------------------- + wait_for_running some-name-rs0 3 + local name=some-name-rs0 + let last_pod=2 + local check_cluster_readyness=true + set_debug + [[ 1 == 1 ]] + set -o xtrace + local rs_name=rs0 + local cluster_name=some-name ++ seq 0 2 + for i in $(seq 0 $last_pod) + [[ 0 -eq 2 ]] + wait_pod some-name-rs0-0 + local pod=some-name-rs0-0 + set +o xtrace waiting for pod/some-name-rs0-0 to be ready...............OK + for i in $(seq 0 $last_pod) + [[ 1 -eq 2 ]] + wait_pod some-name-rs0-1 + local pod=some-name-rs0-1 + set +o xtrace waiting for pod/some-name-rs0-1 to be ready............OK + for i in $(seq 0 $last_pod) + [[ 2 -eq 2 ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.lOWWljZO4n +++ mktemp ++ local LAST_ERR=/tmp/tmp.e20Odxtpwk ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].arbiter.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.lOWWljZO4n ++ cat /tmp/tmp.e20Odxtpwk ++ rm /tmp/tmp.lOWWljZO4n /tmp/tmp.e20Odxtpwk ++ return 0 + [[ '' == true ]] + wait_pod some-name-rs0-2 + local pod=some-name-rs0-2 + set +o xtrace waiting for pod/some-name-rs0-2 to be ready.............OK ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.YiHnFkD7ZK +++ mktemp ++ local LAST_ERR=/tmp/tmp.MpmtbrRPPj ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].nonvoting.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.YiHnFkD7ZK ++ cat /tmp/tmp.MpmtbrRPPj ++ rm /tmp/tmp.YiHnFkD7ZK /tmp/tmp.MpmtbrRPPj ++ return 0 + [[ '' == true ]] ++ kubectl_bin get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' +++ mktemp ++ local LAST_OUT=/tmp/tmp.xNgfah1jvI +++ mktemp ++ local LAST_ERR=/tmp/tmp.r0IPwiTNsT ++ local exit_status=0 ++ local timeout=4 +++ seq 0 2 ++ for i in $(seq 0 2) ++ set +e ++ kubectl get psmdb some-name -o 'jsonpath={.spec.replsets[?(@.name=="rs0")].hidden.enabled}' ++ exit_status=0 ++ set -e ++ '[' 0 '!=' 0 -a -n 1 ']' ++ break ++ cat /tmp/tmp.xNgfah1jvI ++ cat /tmp/tmp.r0IPwiTNsT ++ rm /tmp/tmp.xNgfah1jvI /tmp/tmp.r0IPwiTNsT ++ return 0 + [[ '' == true ]] + sleep 10 + [[ true == true ]] + set +x Waiting for cluster readyness................................... + check_service rs0 + replset_name=rs0 + local expose_path + local svc_name + case $replset_name in + expose_path=/spec/replsets/0/expose + svc_name=some-name-rs0-0 + desc 'add labels and annotation manually to service some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- add labels and annotation manually to service some-name-rs0-0 ----------------------------------------------------------------------------------- + kubectl_bin patch service/some-name-rs0-0 --type=json --patch $'[\n {\n "op": "add", \n "path": "/metadata/labels", \n "value": {\n "notIgnoredLabel": "true",\n "ignoredLabel": "true"\n }\n },\n {\n "op": "add", \n "path": "/metadata/annotations", \n "value": {\n "notIgnoredAnnotation": "true",\n "ignoredAnnotation": "true"\n }\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.XArZHjlM4G ++ mktemp + local LAST_ERR=/tmp/tmp.6IKfCRWZqu + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch service/some-name-rs0-0 --type=json --patch $'[\n {\n "op": "add", \n "path": "/metadata/labels", \n "value": {\n "notIgnoredLabel": "true",\n "ignoredLabel": "true"\n }\n },\n {\n "op": "add", \n "path": "/metadata/annotations", \n "value": {\n "notIgnoredAnnotation": "true",\n "ignoredAnnotation": "true"\n }\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.XArZHjlM4G service/some-name-rs0-0 patched + cat /tmp/tmp.6IKfCRWZqu + rm /tmp/tmp.XArZHjlM4G /tmp/tmp.6IKfCRWZqu + return 0 + sleep 7 + desc 'check if annotations/labels are not deleted from service some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if annotations/labels are not deleted from service some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -manual + local resource=service/some-name-rs0-0 + local postfix=-manual + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.URNJKwkx03 ++ mktemp + local LAST_ERR=/tmp/tmp.E0gn7r28IS + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.URNJKwkx03 + cat /tmp/tmp.E0gn7r28IS + rm /tmp/tmp.URNJKwkx03 /tmp/tmp.E0gn7r28IS + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:17:53+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'adding ignoreAnnotations and ignoreLabels' + set +o xtrace ----------------------------------------------------------------------------------- adding ignoreAnnotations and ignoreLabels ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "add",\n "path": "/spec/ignoreAnnotations",\n "value": ["ignoredAnnotation"]\n },\n {\n "op": "add",\n "path": "/spec/ignoreLabels",\n "value": ["ignoredLabel"]\n }\n ]' ++ mktemp + local LAST_OUT=/tmp/tmp.Z8Pv3jyDE3 ++ mktemp + local LAST_ERR=/tmp/tmp.q0isQWSs8q + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "add",\n "path": "/spec/ignoreAnnotations",\n "value": ["ignoredAnnotation"]\n },\n {\n "op": "add",\n "path": "/spec/ignoreLabels",\n "value": ["ignoredLabel"]\n }\n ]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Z8Pv3jyDE3 perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.q0isQWSs8q + rm /tmp/tmp.Z8Pv3jyDE3 /tmp/tmp.q0isQWSs8q + return 0 + sleep 7 + desc 'check if annotations/labels are not deleted from service some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if annotations/labels are not deleted from service some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -manual + local resource=service/some-name-rs0-0 + local postfix=-manual + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.GOdwmvb3Qs ++ mktemp + local LAST_ERR=/tmp/tmp.UIRjYiGs8x + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.GOdwmvb3Qs + cat /tmp/tmp.UIRjYiGs8x + rm /tmp/tmp.GOdwmvb3Qs /tmp/tmp.UIRjYiGs8x + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-manual.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:02+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'adding labels and annotations to /spec/replsets/0/expose' + set +o xtrace ----------------------------------------------------------------------------------- adding labels and annotations to /spec/replsets/0/expose ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"crLabel": "true",\n\t\t\t}\n },\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"crAnnotation": "true",\n\t\t\t}\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.HrJSSkCyvo ++ mktemp + local LAST_ERR=/tmp/tmp.NHbgeuKeEP + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"crLabel": "true",\n\t\t\t}\n },\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"crAnnotation": "true",\n\t\t\t}\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.HrJSSkCyvo perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.NHbgeuKeEP + rm /tmp/tmp.HrJSSkCyvo /tmp/tmp.NHbgeuKeEP + return 0 + sleep 5 + desc 'check if not ignored labels and annotations are deleted from service some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if not ignored labels and annotations are deleted from service some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -crmeta + local resource=service/some-name-rs0-0 + local postfix=-crmeta + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.uUOLFGY9dA ++ mktemp + local LAST_ERR=/tmp/tmp.fYPhdl7QBU + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.uUOLFGY9dA + cat /tmp/tmp.fYPhdl7QBU + rm /tmp/tmp.uUOLFGY9dA /tmp/tmp.fYPhdl7QBU + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:09+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'removing labels and annotations from /spec/replsets/0/expose' + set +o xtrace ----------------------------------------------------------------------------------- removing labels and annotations from /spec/replsets/0/expose ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "remove", \n "path": "/spec/replsets/0/expose/labels"\n },\n {\n "op": "remove", \n "path": "/spec/replsets/0/expose/annotations"\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.SyTc3Z6d8l ++ mktemp + local LAST_ERR=/tmp/tmp.Otn7PGWVT3 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "remove", \n "path": "/spec/replsets/0/expose/labels"\n },\n {\n "op": "remove", \n "path": "/spec/replsets/0/expose/annotations"\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.SyTc3Z6d8l perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.Otn7PGWVT3 + rm /tmp/tmp.SyTc3Z6d8l /tmp/tmp.Otn7PGWVT3 + return 0 + sleep 5 + desc 'check if labels and annotations are not deleted from service some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if labels and annotations are not deleted from service some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -crmeta + local resource=service/some-name-rs0-0 + local postfix=-crmeta + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.jRYrAjQBA7 ++ mktemp + local LAST_ERR=/tmp/tmp.MzN9itipp7 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.jRYrAjQBA7 + cat /tmp/tmp.MzN9itipp7 + rm /tmp/tmp.jRYrAjQBA7 /tmp/tmp.MzN9itipp7 + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-crmeta.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:17+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'adding other labels and annotations to /spec/replsets/0/expose' + set +o xtrace ----------------------------------------------------------------------------------- adding other labels and annotations to /spec/replsets/0/expose ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"otherCrLabel": "true",\n\t\t\t\t"secondCrLabel": "true",\n\t\t\t}\n },\n\t\t{\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"otherCrAnnotation": "true",\n\t\t\t\t"secondCrAnnotation": "true",\n\t\t\t}\n\t\t}]' ++ mktemp + local LAST_OUT=/tmp/tmp.dNIzZK75vM ++ mktemp + local LAST_ERR=/tmp/tmp.m7N5omR3Jr + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"otherCrLabel": "true",\n\t\t\t\t"secondCrLabel": "true",\n\t\t\t}\n },\n\t\t{\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"otherCrAnnotation": "true",\n\t\t\t\t"secondCrAnnotation": "true",\n\t\t\t}\n\t\t}]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.dNIzZK75vM perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.m7N5omR3Jr + rm /tmp/tmp.dNIzZK75vM /tmp/tmp.m7N5omR3Jr + return 0 + sleep 5 + desc 'check if not previous service labels and annotations is deleted from some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if not previous service labels and annotations is deleted from some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -two-service-labels-annotations + local resource=service/some-name-rs0-0 + local postfix=-two-service-labels-annotations + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-two-service-labels-annotations.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-two-service-labels-annotations-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.1Doafv5n3V ++ mktemp + local LAST_ERR=/tmp/tmp.lf9M9cdkX8 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.1Doafv5n3V + cat /tmp/tmp.lf9M9cdkX8 + rm /tmp/tmp.1Doafv5n3V /tmp/tmp.lf9M9cdkX8 + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-two-service-labels-annotations.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-two-service-labels-annotations.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:24+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'adding removing one labels from /spec/replsets/0/expose' + set +o xtrace ----------------------------------------------------------------------------------- adding removing one labels from /spec/replsets/0/expose ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"otherCrLabel": "true",\n\t\t\t}\n },\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"otherCrAnnotation": "true",\n\t\t\t}\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.614UaCYUJm ++ mktemp + local LAST_ERR=/tmp/tmp.2S2cHCl14d + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/labels", \n\t\t\t"value": {\n\t\t\t\t"otherCrLabel": "true",\n\t\t\t}\n },\n {\n "op": "replace", \n "path": "/spec/replsets/0/expose/annotations", \n\t\t\t"value": {\n\t\t\t\t"otherCrAnnotation": "true",\n\t\t\t}\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.614UaCYUJm perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.2S2cHCl14d + rm /tmp/tmp.614UaCYUJm /tmp/tmp.2S2cHCl14d + return 0 + sleep 5 + desc 'check if removed service label is deleted from some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if removed service label is deleted from some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -one-service-label-annotation + local resource=service/some-name-rs0-0 + local postfix=-one-service-label-annotation + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-one-service-label-annotation.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-one-service-label-annotation-oc.yml ']' + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - + kubectl_bin get -o yaml service/some-name-rs0-0 ++ mktemp + local LAST_OUT=/tmp/tmp.1XEdMUE8SH ++ mktemp + local LAST_ERR=/tmp/tmp.Z6JDtFyw3f + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.1XEdMUE8SH + cat /tmp/tmp.Z6JDtFyw3f + rm /tmp/tmp.1XEdMUE8SH /tmp/tmp.Z6JDtFyw3f + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-one-service-label-annotation.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-one-service-label-annotation.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:31+0000] compare_kubectl: service/some-name-rs0-0 OK + desc 'removing ignoreLabels and ignoreAnnotations' + set +o xtrace ----------------------------------------------------------------------------------- removing ignoreLabels and ignoreAnnotations ----------------------------------------------------------------------------------- + kubectl_bin patch psmdb some-name --type=json --patch $'[\n {\n "op": "remove", \n "path": "/spec/ignoreAnnotations",\n },\n {\n "op": "remove", \n "path": "/spec/ignoreLabels",\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.ACcyjipR4b ++ mktemp + local LAST_ERR=/tmp/tmp.gLEbaX3Tpx + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch psmdb some-name --type=json --patch $'[\n {\n "op": "remove", \n "path": "/spec/ignoreAnnotations",\n },\n {\n "op": "remove", \n "path": "/spec/ignoreLabels",\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.ACcyjipR4b perconaservermongodb.psmdb.percona.com/some-name patched + cat /tmp/tmp.gLEbaX3Tpx + rm /tmp/tmp.ACcyjipR4b /tmp/tmp.gLEbaX3Tpx + return 0 + sleep 5 + desc 'check if ignored labels and annotations are deleted from some-name-rs0-0' + set +o xtrace ----------------------------------------------------------------------------------- check if ignored labels and annotations are deleted from some-name-rs0-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-rs0-0 -no-ignored-meta + local resource=service/some-name-rs0-0 + local postfix=-no-ignored-meta + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-no-ignored-meta.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-no-ignored-meta-oc.yml ']' + kubectl_bin get -o yaml service/some-name-rs0-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.TAhcSH5M3Y ++ mktemp + local LAST_ERR=/tmp/tmp.xqkeIKShvh + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-rs0-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.TAhcSH5M3Y + cat /tmp/tmp.xqkeIKShvh + rm /tmp/tmp.TAhcSH5M3Y /tmp/tmp.xqkeIKShvh + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + version_gt 1.22 ++ bc -l ++ echo '1.33 >= 1.22' + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-no-ignored-meta.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-rs0-0-no-ignored-meta.yml /tmp/tmp.qoTzVvW27a/service_some-name-rs0-0.yml + log 'compare_kubectl: service/some-name-rs0-0 OK' + set +o xtrace [2026-06-09T09:18:39+0000] compare_kubectl: service/some-name-rs0-0 OK + check_service cfg + replset_name=cfg + local expose_path + local svc_name + case $replset_name in + expose_path=/spec/sharding/configsvrReplSet/expose + svc_name=some-name-cfg-0 + desc 'add labels and annotation manually to service some-name-cfg-0' + set +o xtrace ----------------------------------------------------------------------------------- add labels and annotation manually to service some-name-cfg-0 ----------------------------------------------------------------------------------- + kubectl_bin patch service/some-name-cfg-0 --type=json --patch $'[\n {\n "op": "add", \n "path": "/metadata/labels", \n "value": {\n "notIgnoredLabel": "true",\n "ignoredLabel": "true"\n }\n },\n {\n "op": "add", \n "path": "/metadata/annotations", \n "value": {\n "notIgnoredAnnotation": "true",\n "ignoredAnnotation": "true"\n }\n }]' ++ mktemp + local LAST_OUT=/tmp/tmp.za0EwLYo8T ++ mktemp + local LAST_ERR=/tmp/tmp.Ox2w9ZZnr6 + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl patch service/some-name-cfg-0 --type=json --patch $'[\n {\n "op": "add", \n "path": "/metadata/labels", \n "value": {\n "notIgnoredLabel": "true",\n "ignoredLabel": "true"\n }\n },\n {\n "op": "add", \n "path": "/metadata/annotations", \n "value": {\n "notIgnoredAnnotation": "true",\n "ignoredAnnotation": "true"\n }\n }]' + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.za0EwLYo8T service/some-name-cfg-0 patched + cat /tmp/tmp.Ox2w9ZZnr6 + rm /tmp/tmp.za0EwLYo8T /tmp/tmp.Ox2w9ZZnr6 + return 0 + sleep 7 + desc 'check if annotations/labels are not deleted from service some-name-cfg-0' + set +o xtrace ----------------------------------------------------------------------------------- check if annotations/labels are not deleted from service some-name-cfg-0 ----------------------------------------------------------------------------------- + compare_kubectl service/some-name-cfg-0 -manual + local resource=service/some-name-cfg-0 + local postfix=-manual + local skip_generation_check= + local expected_result=/mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-cfg-0-manual.yml + local new_result=/tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml + '[' -n '' -a -f /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-cfg-0-manual-oc.yml ']' + kubectl_bin get -o yaml service/some-name-cfg-0 + yq eval $'\n\t\t\tdel(.metadata.ownerReferences[].apiVersion) |\n\t\t\tdel(.metadata.managedFields) |\n\t\t\tdel(.. | select(has("creationTimestamp")).creationTimestamp) |\n\t\t\tdel(.. | select(has("namespace")).namespace) |\n\t\t\tdel(.. | select(has("uid")).uid) |\n\t\t\tdel(.metadata.resourceVersion) |\n\t\t\tdel(.spec.template.spec.containers[].env[] | select(.name == "NAMESPACE")) |\n\t\t\tdel(.metadata.selfLink) |\n\t\t\tdel(.metadata.annotations."cloud.google.com/neg") |\n\t\t\tdel(.metadata.annotations."kubectl.kubernetes.io/last-applied-configuration") |\n\t\t\tdel(.. | select(has("image")).image) |\n\t\t\tdel(.. | select(has("clusterIP")).clusterIP) |\n\t\t\tdel(.. | select(has("clusterIPs")).clusterIPs) |\n\t\t\tdel(.. | select(has("dataSource")).dataSource) |\n\t\t\tdel(.. | select(has("procMount")).procMount) |\n\t\t\tdel(.. | select(has("storageClassName")).storageClassName) |\n\t\t\tdel(.. | select(has("finalizers")).finalizers) |\n\t\t\tdel(.. | select(has("kubernetes.io/pvc-protection"))."kubernetes.io/pvc-protection") |\n\t\t\tdel(.. | select(has("volumeName")).volumeName) |\n\t\t\tdel(.. | select(has("volume.beta.kubernetes.io/storage-provisioner"))."volume.beta.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/storage-provisioner"))."volume.kubernetes.io/storage-provisioner") |\n\t\t\tdel(.spec.volumeMode) |\n\t\t\tdel(.. | select(has("volume.kubernetes.io/selected-node"))."volume.kubernetes.io/selected-node") |\n\t\t\tdel(.. | select(has("percona.com/last-config-hash"))."percona.com/last-config-hash") |\n\t\t\tdel(.. | select(has("percona.com/configuration-hash"))."percona.com/configuration-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-hash"))."percona.com/ssl-hash") |\n\t\t\tdel(.. | select(has("percona.com/ssl-internal-hash"))."percona.com/ssl-internal-hash") |\n\t\t\tdel(.spec.volumeClaimTemplates[].spec.volumeMode | select(. == "Filesystem")) |\n\t\t\tdel(.. | select(has("healthCheckNodePort")).healthCheckNodePort) |\n\t\t\tdel(.. | select(has("nodePort")).nodePort) |\n\t\t\tdel(.status) |\n\t\t\t(.. | select(tag == "!!str")) |= sub("ignore-labels-annotations-5248", "NAME_SPACE") |\n\t\t\tdel(.spec.volumeClaimTemplates[].apiVersion) |\n\t\t\tdel(.spec.volumeClaimTemplates[].kind) |\n\t\t\tdel(.spec.ipFamilies) |\n\t\t\tdel(.spec.ipFamilyPolicy) |\n\t\t\t(.. | select(. == "extensions/v1beta1")) = "apps/v1" |\n\t\t\t(.. | select(. == "batch/v1beta1")) = "batch/v1" ' - ++ mktemp + local LAST_OUT=/tmp/tmp.Q8sUuzIlq6 ++ mktemp + local LAST_ERR=/tmp/tmp.txMJWhNJov + local exit_status=0 + local timeout=4 ++ seq 0 2 + for i in $(seq 0 2) + set +e + kubectl get -o yaml service/some-name-cfg-0 + exit_status=0 + set -e + '[' 0 '!=' 0 -a -n 1 ']' + break + cat /tmp/tmp.Q8sUuzIlq6 + cat /tmp/tmp.txMJWhNJov + rm /tmp/tmp.Q8sUuzIlq6 /tmp/tmp.txMJWhNJov + return 0 + yq -i eval 'del(.spec.persistentVolumeClaimRetentionPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml + version_gt 1.22 ++ echo '1.33 >= 1.22' ++ bc -l + '[' 1 -eq 1 ']' + return 0 + yq -i eval 'del(.spec.internalTrafficPolicy)' /tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml + yq -i eval 'del(.spec.allocateLoadBalancerNodePorts)' /tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml + [[ /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-cfg-0-manual.yml == */cronjob* ]] + '[' -n '' ']' + [[ 0 -eq 0 ]] + diff -u /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-cfg-0-manual.yml /tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml --- /mnt/jenkins/workspace/cloud-psmdb-operator_PR-2058/e2e-tests/ignore-labels-annotations/compare/service_some-name-cfg-0-manual.yml 2026-06-09 07:16:00.944532271 +0000 +++ /tmp/tmp.qoTzVvW27a/service_some-name-cfg-0.yml 2026-06-09 09:18:47.830383579 +0000 @@ -1,9 +1,7 @@ apiVersion: v1 kind: Service metadata: - annotations: - ignoredAnnotation: "true" - notIgnoredAnnotation: "true" + annotations: {} labels: app.kubernetes.io/component: external-service app.kubernetes.io/instance: some-name @@ -11,8 +9,6 @@ app.kubernetes.io/name: percona-server-mongodb app.kubernetes.io/part-of: percona-server-mongodb app.kubernetes.io/replset: cfg - ignoredLabel: "true" - notIgnoredLabel: "true" name: some-name-cfg-0 ownerReferences: - controller: true ++ caller + log 'compare_kubectl (66 run) failed with diff' + set +o xtrace [2026-06-09T09:18:47+0000] compare_kubectl (66 run) failed with diff + exit 1