Skip to content

Conversation

Julien-Ben
Copy link
Collaborator

Summary

Proof of Work

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?

@github-actions
Copy link

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.6.0 Release Notes

New Features

  • MongoDBCommunity: Added support to configure custom cluster domain via newly introduced spec.clusterDomain resource field. If spec.clusterDomain is not set, environment variable CLUSTER_DOMAIN is used as cluster domain. If the environment variable CLUSTER_DOMAIN is also not set, operator falls back to cluster.local as default cluster domain.
  • Helm Chart: Introduced two new helm fields operator.podSecurityContext and operator.securityContext that can be used to configure securityContext for Operator deployment through Helm Chart.

Bug Fixes

  • Fixed parsing of the customEnvVars Helm value when values contain = characters.

// readState abstract reading the state of the resource that we store on the cluster between reconciliations.
func (h *ReplicaSetReconcilerHelper) readState() (*ReplicaSetDeploymentState, error) {
// Try to get the last achieved spec from annotations and store it in state
if lastAchievedSpec, err := h.resource.GetLastSpec(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

this should probably one-off migration step?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For now it's not a migration, I just abstracted the state reading/writing in a separate function (instead of randomly accessing annotations during the reconcile)
It will make more sense with a more complex state. I may even use the state_store at that point


// Reconcile reads that state of the cluster for a MongoDbReplicaSet object and makes changes based on the state read
// and what is in the MongoDbReplicaSet.Spec
func (r *ReconcileMongoDbReplicaSet) Reconcile(ctx context.Context, request reconcile.Request) (res reconcile.Result, e error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

consider putting real controller in one file and the helper in another mongodbreplicaset_reconciler_helper to separate clearly what's being executed in real Reconcile even, and what as part of the helper

@Julien-Ben
Copy link
Collaborator Author

Closed in favor of #544

@Julien-Ben Julien-Ben closed this Oct 21, 2025
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.

2 participants