Skip to content

Search: use ConfigMap instead of Secret for external TLS CA#909

Draft
lsierant wants to merge 2 commits intosearch/multiple-mongotfrom
search/lsierant/ca-as-configmap
Draft

Search: use ConfigMap instead of Secret for external TLS CA#909
lsierant wants to merge 2 commits intosearch/multiple-mongotfrom
search/lsierant/ca-as-configmap

Conversation

@lsierant
Copy link
Contributor

@lsierant lsierant commented Mar 17, 2026

Summary

The ExternalMongodTLS CA reference was incorrectly using a Secret volume
and Secret watch. This changes it to use a ConfigMap, consistent with how
enterprise and community search sources already handle CA certificates.

Changes:

  • Update ExternalMongodTLS.CA comment and CRD descriptions
  • Switch CreateVolumeFromSecret to CreateVolumeFromConfigMap in both
    external_search_source.go and sharded_external_search_source.go
  • Update resource watches from watch.Secret to watch.ConfigMap
  • Update unit tests to assert ConfigMap volume source
  • Update e2e tests to create CA as ConfigMap with ca.crt key
  • Update doc snippets to reference ConfigMap instead of Secret

Based on PR #817

Chain of upstream PRs as of 2026-03-18

@lsierant lsierant self-assigned this Mar 17, 2026
@lsierant lsierant force-pushed the search/multiple-mongot branch from a8147b6 to 4a1be64 Compare March 23, 2026 17:46
@lsierant lsierant force-pushed the search/lsierant/ca-as-configmap branch from 87e1e48 to 9f99f28 Compare March 23, 2026 17:49
@lsierant lsierant force-pushed the search/multiple-mongot branch from e21bef7 to 7008937 Compare March 26, 2026 07:49
The ExternalMongodTLS CA reference was incorrectly using a Secret volume
and Secret watch. This changes it to use a ConfigMap, consistent with how
enterprise and community search sources already handle CA certificates.

Changes:
- Update ExternalMongodTLS.CA comment and CRD descriptions
- Switch CreateVolumeFromSecret to CreateVolumeFromConfigMap in both
  external_search_source.go and sharded_external_search_source.go
- Update resource watches from watch.Secret to watch.ConfigMap
- Update unit tests to assert ConfigMap volume source
- Update e2e tests to create CA as ConfigMap with ca.crt key
- Update doc snippets to reference ConfigMap instead of Secret

# Conflicts:
#	docker/mongodb-kubernetes-tests/tests/common/search/sharded_search_helper.py
@lsierant lsierant force-pushed the search/lsierant/ca-as-configmap branch from 9f99f28 to c490ded Compare March 26, 2026 07:50
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.

1 participant