Skip to content
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

EVEREST-1836 PSMDB 1.19.0 #648

Merged
merged 36 commits into from
Jan 27, 2025

Conversation

oksana-grishchenko
Copy link
Contributor

@oksana-grishchenko oksana-grishchenko commented Jan 27, 2025

CHANGE DESCRIPTION

Problem:
EVEREST-1836

Add support for PSMDB 1.19.0

Related pull requests

CHECKLIST

Helm chart

  • Is the helm chart updated with the new changes? (if applicable)

Jira

  • Is the Jira ticket created and referenced properly?

Tests

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

# Conflicts:
#	.github/workflows/ci.yml
#	go.mod
#	go.sum
#	internal/controller/providers/psmdb/applier.go
Comment on lines -57 to +70
// 1-node cluster, former 1-node cluster, a cluster with deprecated AllowUnsafeConfiguration
value := p.DB.Spec.Engine.Replicas == 1 || p.PerconaServerMongoDB.Spec.UnsafeConf || p.DB.Spec.AllowUnsafeConfiguration
p.PerconaServerMongoDB.Spec.UnsafeConf = value
p.PerconaServerMongoDB.Spec.UnsafeConf = false
useInsecureSize := p.DB.Spec.Engine.Replicas == 1 || p.DB.Spec.AllowUnsafeConfiguration
p.PerconaServerMongoDB.Spec.Unsafe = psmdbv1.UnsafeFlags{
TLS: p.DB.Spec.AllowUnsafeConfiguration,
MongosSize: useInsecureSize,
ReplsetSize: useInsecureSize,
TerminationGracePeriod: p.DB.Spec.AllowUnsafeConfiguration,
BackupIfUnhealthy: p.DB.Spec.AllowUnsafeConfiguration,
}
if p.DB.Spec.AllowUnsafeConfiguration {
p.PerconaServerMongoDB.Spec.TLS = &psmdbv1.TLSSpec{
Mode: psmdbv1.TLSModeDisabled,
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using p.DB.Spec.AllowUnsafeConfiguration for backward compatibility with the already existing clusters on the Everest side. However on the psmdb side we don't use p.PerconaServerMongoDB.Spec.UnsafeConf anymore but use more specific psmdbv1.UnsafeFlags flags.

Here is how psmdb handles psmdbv1.UnsafeFlags, that's why to make the old clusters work correctly we also need to set .PerconaServerMongoDB.Spec.TLS for them.

@oksana-grishchenko oksana-grishchenko marked this pull request as ready for review January 27, 2025 13:21
@oksana-grishchenko oksana-grishchenko requested a review from a team as a code owner January 27, 2025 13:21
@oksana-grishchenko oksana-grishchenko merged commit 154b67b into upstream-upgrades Jan 27, 2025
5 checks passed
@oksana-grishchenko oksana-grishchenko deleted the EVEREST-1836-psmdb-1.19.0 branch January 27, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test/e2e Run full E2E test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants