Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3ec055e
[Search] Implement gRPC and mTLS
fealebenpae Oct 13, 2025
6593b18
Merge remote-tracking branch 'origin/master' into fealebenpae/search-…
fealebenpae Oct 16, 2025
b791c36
fix external tests and snippets
fealebenpae Oct 16, 2025
53e9334
try fix enterprise tests
fealebenpae Oct 16, 2025
cdc55d4
update unit tests for wireproto annotation
fealebenpae Oct 16, 2025
83e9b33
bump version of mongod in external snippets
fealebenpae Oct 16, 2025
14bedcf
try fix external tests take 2
fealebenpae Oct 16, 2025
8dc3d81
cheat linter
fealebenpae Oct 16, 2025
f4a1a34
remove searchCoordinator polyfill from external snippets
fealebenpae Oct 16, 2025
75c83de
update the port in external snippets
fealebenpae Oct 20, 2025
83d91a0
remove upgrade test
fealebenpae Oct 23, 2025
0c6fd48
tracer
anandsyncs Oct 29, 2025
63813e3
env var unification
anandsyncs Oct 29, 2025
843fd3b
Merge branch 'fealebenpae/search-grpc' into anandsyncs/add-certmanage…
anandsyncs Oct 29, 2025
ab1718f
expand on the wireproto override
fealebenpae Oct 30, 2025
cb83dbc
changelog
fealebenpae Oct 30, 2025
326ad85
Merge branch 'master' into fealebenpae/search-grpc
fealebenpae Oct 30, 2025
aa0dc82
rename force-wireproto annotation
fealebenpae Oct 30, 2025
0b8bff0
tracer
anandsyncs Oct 30, 2025
fcb92ca
cleanup
anandsyncs Oct 30, 2025
dae55bd
tracer
anandsyncs Oct 30, 2025
fda22ee
cleanup
anandsyncs Oct 31, 2025
7ef1ae2
remove extra file
anandsyncs Oct 31, 2025
4c38389
break down big snippet file
anandsyncs Oct 31, 2025
060b7be
Merge branch 'fealebenpae/search-grpc' into anandsyncs/add-certmanage…
anandsyncs Oct 31, 2025
5231723
cleanup community
anandsyncs Oct 31, 2025
714b2cc
cleanup
anandsyncs Oct 31, 2025
8d95b3f
address pr comments
anandsyncs Nov 3, 2025
1b80dd1
remove extraneous change
anandsyncs Nov 3, 2025
86d13a7
use cluster issuer
anandsyncs Nov 4, 2025
2010b55
Merge branch 'master' into anandsyncs/add-certmanager-community-searc…
anandsyncs Nov 4, 2025
0a13ee9
use cluster issuer
anandsyncs Nov 4, 2025
a5fc3fc
use tls stuff in uri
anandsyncs Nov 5, 2025
648facd
Remove enterprise search changes from community branch
anandsyncs Nov 5, 2025
548fc39
cleanup
anandsyncs Nov 5, 2025
bdf65ef
cleanup
anandsyncs Nov 5, 2025
286e079
cleanup
anandsyncs Nov 5, 2025
a2906ab
fix external snippet compatibility
anandsyncs Nov 5, 2025
2a09806
update install cert manager script
anandsyncs Nov 6, 2025
d59c707
add enterprise snippets for search tls updates
anandsyncs Nov 6, 2025
fed0f08
add enterprise snippets for search tls updates
anandsyncs Nov 6, 2025
764c831
Comm snippets squashed
fealebenpae Oct 13, 2025
ead9142
add enterprise snippets for search tls updates
anandsyncs Nov 6, 2025
c023c5e
Removed redundant path separator in mongot config
lsierant Nov 6, 2025
786a502
Lint
lsierant Nov 6, 2025
ca9d756
Add sleep to deflake enterprise snippets
lsierant Nov 6, 2025
8e21bad
add log fix
anandsyncs Nov 7, 2025
7902e41
Merge remote-tracking branch 'origin/anandsyncs/mck-search-enterprise…
anandsyncs Nov 7, 2025
5a129af
Update docs/search/03-search-query-usage/env_variables.sh
lsierant Nov 7, 2025
a33ef9c
Merge branch 'master' into anandsyncs/mck-search-enterprise-snippets-…
lsierant Nov 7, 2025
594d800
fix lint
anandsyncs Nov 7, 2025
62f8046
address pr comment
anandsyncs Nov 10, 2025
57950af
Apply suggestion from @anandsyncs
anandsyncs Nov 10, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use cluster issuer
  • Loading branch information
anandsyncs committed Nov 4, 2025
commit 86d13a78d292b8c95460e362e9fb68cc49e81770
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Bootstrap a self-signed Issuer scoped to the cert-manager namespace. This is
# only used to mint the CA secret and is not referenced by application
# workloads.
kubectl apply --context "${K8S_CTX}" -n "${CERT_MANAGER_NAMESPACE}" -f - <<EOF_MANIFEST
# Bootstrap a self-signed ClusterIssuer to mint the CA secret consumed by application workloads.
kubectl apply --context "${K8S_CTX}" -f - <<EOF_MANIFEST
apiVersion: cert-manager.io/v1
kind: Issuer
kind: ClusterIssuer
metadata:
name: ${MDB_TLS_SELF_SIGNED_ISSUER}
spec:
selfSigned: {}
EOF_MANIFEST

kubectl --context "${K8S_CTX}" wait --namespace "${CERT_MANAGER_NAMESPACE}" --for=condition=Ready issuer "${MDB_TLS_SELF_SIGNED_ISSUER}"
kubectl --context "${K8S_CTX}" wait --for=condition=Ready clusterissuer "${MDB_TLS_SELF_SIGNED_ISSUER}"

kubectl apply --context "${K8S_CTX}" -f - <<EOF_MANIFEST
apiVersion: cert-manager.io/v1
Expand All @@ -27,37 +25,29 @@ spec:
size: 256
issuerRef:
name: ${MDB_TLS_SELF_SIGNED_ISSUER}
kind: Issuer
kind: ClusterIssuer
EOF_MANIFEST

kubectl --context "${K8S_CTX}" wait --for=condition=Ready -n "${CERT_MANAGER_NAMESPACE}" certificate "${MDB_TLS_CA_CERT_NAME}"

TMP_DIR="$(mktemp -d)"
trap 'rm -rf "${TMP_DIR}"' EXIT

kubectl --context "${K8S_CTX}" get secret "${MDB_TLS_CA_SECRET_NAME}" -n "${CERT_MANAGER_NAMESPACE}" -o jsonpath="{.data['ca\\.crt']}" | base64 --decode > "${TMP_DIR}/ca.crt"

cat "${TMP_DIR}/ca.crt" > "${TMP_DIR}/mms-ca.crt"

kubectl --context "${K8S_CTX}" create configmap "${MDB_TLS_CA_CONFIGMAP}" -n "${MDB_NS}" \
--from-file=ca-pem="${TMP_DIR}/mms-ca.crt" --from-file=mms-ca.crt="${TMP_DIR}/mms-ca.crt" \
--dry-run=client -o yaml | kubectl --context "${K8S_CTX}" apply -f -

# Ensure CA secret also exists in application namespace for mounts expecting a Secret (root-secret)
if ! kubectl --context "${K8S_CTX}" -n "${MDB_NS}" get secret "${MDB_TLS_CA_SECRET_NAME}" >/dev/null 2>&1; then
kubectl --context "${K8S_CTX}" -n "${CERT_MANAGER_NAMESPACE}" get secret "${MDB_TLS_CA_SECRET_NAME}" -o yaml \
| sed 's/namespace: .*/namespace: '"${MDB_NS}"'/' \
| kubectl --context "${K8S_CTX}" apply -n "${MDB_NS}" -f - || echo "Warning: failed to copy ${MDB_TLS_CA_SECRET_NAME} to ${MDB_NS}" >&2
fi

kubectl apply --context "${K8S_CTX}" -n "${MDB_NS}" -f - <<EOF_MANIFEST
kubectl apply --context "${K8S_CTX}" -f - <<EOF_MANIFEST
apiVersion: cert-manager.io/v1
kind: Issuer
kind: ClusterIssuer
metadata:
name: ${MDB_TLS_CA_ISSUER}
spec:
ca:
secretName: ${MDB_TLS_CA_SECRET_NAME}
EOF_MANIFEST

kubectl --context "${K8S_CTX}" wait --namespace "${MDB_NS}" --for=condition=Ready issuer "${MDB_TLS_CA_ISSUER}"
kubectl --context "${K8S_CTX}" wait --for=condition=Ready clusterissuer "${MDB_TLS_CA_ISSUER}"

TMP_CA_CERT="$(mktemp)"
trap 'rm -f "${TMP_CA_CERT}"' EXIT

kubectl --context "${K8S_CTX}" get secret "${MDB_TLS_CA_SECRET_NAME}" -n "${CERT_MANAGER_NAMESPACE}" -o jsonpath="{.data['ca\\.crt']}" | base64 --decode > "${TMP_CA_CERT}"

kubectl --context "${K8S_CTX}" create configmap "${MDB_TLS_CA_CONFIGMAP}" -n "${MDB_NS}" \
--from-file=ca-pem="${TMP_CA_CERT}" --from-file=mms-ca.crt="${TMP_CA_CERT}" \
--from-file=ca.crt="${TMP_CA_CERT}" \
--dry-run=client -o yaml | kubectl --context "${K8S_CTX}" apply -f -
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
secretName: ${MDB_TLS_SERVER_CERT_SECRET_NAME}
issuerRef:
name: ${MDB_TLS_CA_ISSUER}
kind: Issuer
kind: ClusterIssuer
duration: 240h0m0s
renewBefore: 120h0m0s
usages:
Expand All @@ -31,7 +31,7 @@ spec:
secretName: ${MDB_SEARCH_TLS_SECRET_NAME}
issuerRef:
name: ${MDB_TLS_CA_ISSUER}
kind: Issuer
kind: ClusterIssuer
duration: 240h0m0s
renewBefore: 120h0m0s
usages:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ spec:
restartPolicy: Never
volumes:
- name: mongo-ca
secret:
secretName: ${MDB_TLS_CA_SECRET_NAME}
configMap:
name: ${MDB_TLS_CA_CONFIGMAP}
items:
- key: ca.crt
path: ca.crt
EOF

echo "Waiting for the mongodb-tools to be ready..."
Expand Down