Skip to content

K8SPG-719 fixes on the deploy_pmm3_server for openshift #1224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 16, 2025
Merged

Conversation

gkech
Copy link
Contributor

@gkech gkech commented Jul 15, 2025

K8SPG-719 Powered by Pull Request Badge

CHANGE DESCRIPTION

Problem:

Errors observed:

kl monitoring-0

  • [[ 1000 != 1000 ]]
  • '[' '!' -f /pmmdata/app-init ']'
  • mkdir -p /pmmdata
  • rsync -a --owner=1000 /srv/prometheus/data/ /pmmdata/prometheus-data/
    rsync: [sender] change_dir "/srv/prometheus/data" failed: No such file or directory (2)
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1327) [sender=3.2.5]

Cause:
Short explanation of the root cause of the issue if applicable.

Solution:
Short explanation of the solution we are providing with this PR.

CHECKLIST

Jira

  • Is the Jira ticket created and referenced properly?
  • Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
  • Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

  • Is an E2E test/test case added for the new feature/change?
  • Are unit tests added where appropriate?

Config/Logging/Testability

  • Are all needed new/changed options added to default YAML files?
  • Are all needed new/changed options added to the Helm Chart?
  • Did we add proper logging messages for operator actions?
  • Did we ensure compatibility with the previous version or cluster upgrade process?
  • Does the change support oldest and newest supported PG version?
  • Does the change support oldest and newest supported Kubernetes version?

@gkech gkech force-pushed the K8SPG-719-fix-oc branch from 1feebb9 to 39205a0 Compare July 15, 2025 14:29
@gkech gkech marked this pull request as ready for review July 15, 2025 14:32
@@ -384,24 +383,25 @@ deploy_pmm3_server() {
oc create rolebinding pmm-pg-operator-namespace-only --role percona-postgresql-operator --serviceaccount=$NAMESPACE:pmm-server -n "${NAMESPACE}"
oc patch role/percona-postgresql-operator --type json -p='[{"op":"add","path": "/rules/-","value":{"apiGroups":["security.openshift.io"],"resources":["securitycontextconstraints"],"verbs":["use"],"resourceNames":["privileged"]}}]' -n "$NAMESPACE"
fi
helm install monitoring --set imageTag=${IMAGE_PMM3_SERVER#*:} --set imageRepo=${IMAGE_PMM3_SERVER%:*} --set platform=$platform --set sa=pmm-server --set supresshttp2=false https://percona-charts.storage.googleapis.com/pmm-server-${PMM_SERVER_VERSION}.tgz -n "$NAMESPACE"
else
platform=kubernetes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we remove platform for not openshift in this case?

Copy link
Contributor Author

@gkech gkech Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we dont specify anything we default to k8s, e.g. in ps we don't specify it.

845ffae

@JNKPercona
Copy link
Collaborator

Test Name Result Time
backup-enable-disable passed 00:00:00
custom-extensions passed 00:00:00
custom-tls passed 00:00:00
database-init-sql passed 00:00:00
demand-backup passed 00:24:43
finalizers passed 00:00:00
init-deploy passed 00:00:00
monitoring passed 00:00:00
monitoring-pmm3 passed 00:00:00
one-pod passed 00:00:00
operator-self-healing passed 00:00:00
pgvector-extension passed 00:00:00
pitr passed 00:00:00
scaling passed 00:00:00
scheduled-backup passed 00:00:00
self-healing passed 00:00:00
sidecars passed 00:00:00
start-from-backup passed 00:00:00
tablespaces passed 00:00:00
telemetry-transfer passed 00:00:00
upgrade-consistency passed 00:00:00
upgrade-minor passed 00:00:00
users passed 00:00:00
We run 23 out of 23 00:24:43

commit: 16d2d38
image: perconalab/percona-postgresql-operator:PR-1224-16d2d38fd

@hors hors self-requested a review July 16, 2025 09:34
@hors hors merged commit 2098d67 into main Jul 16, 2025
18 of 19 checks passed
@hors hors deleted the K8SPG-719-fix-oc branch July 16, 2025 10:38
jvpasinatto pushed a commit that referenced this pull request Jul 16, 2025
* K8SPG-719 fixes on the deploy_pmm3_server for openshift

* shfmt

* remove platform specific set

* move init on top of the function

* add retry func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants