Skip to content

Conversation

@lucian-tosa
Copy link
Contributor

@lucian-tosa lucian-tosa commented Nov 14, 2025

Summary

This PR removes any code that downloads go & delve at runtime from the agent-launcher script. Instead of enabling debugging of the agent from the script, this is now enabled via the operator. When setting MDB_AGENT_DEBUG to true in the private context, the operator will add a sidecar which runs delve by attaching to the agent's process.

Instructions for using can be found in our wiki.

Proof of Work

This is a local development improvement. It can be checked by adding the env variable to the context and seeing the delve sidecar running.

~ % kubectl get pods my-mc-replicaset-0-0 -o jsonpath='{.spec.initContainers[*].name}'
delve-sidecar mongodb-kubernetes-init-database istio-init

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?

@lucian-tosa lucian-tosa changed the title Lucian/dlv sidecar Delve sidecar Nov 14, 2025
@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.
  • MongoDBSearch:
    • Switched to gRPC and mTLS for internal communication between mongod and mongot.
      • Since MCK 1.4 the mongod and mongot processess communicated using the MongoDB Wire Protocol and used keyfile authentication. This release switches that to gRPC with mTLS authentication. gRPC will allow for load-balancing search queries against multiple mongot processes in the future, and mTLS decouples the internal cluster authentication mode and credentials among mongod processes from the connection to the mongot process. The Operator will automatically enable gRPC for existing and new workloads, and will enable mTLS authentication if both Database Server and MongoDBSearch resource are configured for TLS.
    • Exposed configuration settings for mongot's prometheus metrics endpoint.
      • By default, if spec.prometheus field is not provided then metrics endpoint in mongot is disabled. This is a breaking change. Previously the metrics endpoing was always enabled on port 9946.
      • To enable prometheus metrics endpoint specify empty spec.prometheus: field. It will enable metrics endpoint on a default port (9946). To change the port, set it in spec.prometheus.port field.
    • Simplified MongoDB Search setup: Removed the custom Search Coordinator polyfill (a piece of compatibility code previously needed to add the required permissions), as MongoDB 8.2.0 and later now include the necessary permissions via the built-in searchCoordinator role.
    • Updated the default mongodb/mongodb-search image version to 0.55.0. This is the version MCK uses if .spec.version is not specified.
    • MongoDB deployments using X509 internal cluster authentication are now supported. Previously MongoDB Search required SCRAM authentication among members of a MongoDB replica set. Note: SCRAM client authentication is still required, this change merely relaxes the requirements on internal cluster authentication.

Bug Fixes

  • Fixed parsing of the customEnvVars Helm value when values contain = characters.
  • ReplicaSet: Blocked disabling TLS and changing member count simultaneously. These operations must now be applied separately to prevent configuration inconsistencies.
  • MongoDBSearch now records the reconciled mongot version in status and exposes it via a dedicated kubectl print column.
  • Fixed inability to specify cluster-wide privileges in custom roles.

Other Changes

  • kubectl-mongodb plugin: cosign, the signing tool that is used to sign kubectl-mongodb plugin binaries, has been updated to version 3.0.2. With this change, released binaries will be bundled with .bundle files containing both signature and certificate information. For more information on how to verify signatures using new cosign version please refer to -> https://github.com/sigstore/cosign/blob/v3.0.2/doc/cosign_verify-blob.md

@lucian-tosa lucian-tosa added the skip-changelog Use this label in Pull Request to not require new changelog entry file label Nov 14, 2025
# Conflicts:
#	scripts/dev/contexts/private-context-template
@lucian-tosa lucian-tosa changed the title Delve sidecar CLOUDP-334392 - Add Delve sidecar for debugging the agent Nov 14, 2025
@lucian-tosa lucian-tosa marked this pull request as ready for review November 14, 2025 13:01
@lucian-tosa lucian-tosa requested a review from a team as a code owner November 14, 2025 13:01
Copy link
Contributor

@lsierant lsierant left a comment

Choose a reason for hiding this comment

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

This is awesome!

@@ -0,0 +1,13 @@
#!/bin/bash
Copy link
Collaborator

@MaciejKaras MaciejKaras Nov 14, 2025

Choose a reason for hiding this comment

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

nit: I'm missing some README.md file that will describe what this image is about, how to use it and how to build it (even though I know it is straightforward)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use this label in Pull Request to not require new changelog entry file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants