feat(crd): add security context and resource configuration support#113
Merged
jmhbh merged 1 commit intokagent-dev:mainfrom Jan 27, 2026
Merged
Conversation
e701bd7 to
aeea2ed
Compare
aeea2ed to
d9b4d32
Compare
Add comprehensive security and resource configuration options to the MCPServer CRD to enable production-ready deployments following Kubernetes security best practices. Signed-off-by: skhedim <sebastien.khedim@gmail.com>
d9b4d32 to
521e30f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Security Context and Resource Configuration Support to MCPServer CRD
Summary
This PR adds comprehensive security and resource configuration options to the MCPServer CRD, enabling production-ready deployments that follow Kubernetes security best practices and provide fine-grained control over resource allocation and pod scheduling.
Motivation
Currently, the MCPServer CRD has limited configuration options for production deployments. Organizations deploying MCP servers in production environments need:
Changes Made
New fields added to
MCPServerDeployment:Security & Access Control
securityContext– Container-level security context (e.g.,runAsNonRoot, capabilities, etc.)podSecurityContext– Pod-level security context (e.g.,fsGroup,seccompProfile, etc.)imagePullSecrets– Registry credentials for private container imagesResource Management
resources– CPU/memory requests and limits for the main containerreplicas– Number of pod replicas for horizontal scalingPod Scheduling
tolerations– Node tolerations for tainted nodesaffinity– Pod/node affinity and anti-affinity rulesnodeSelector– Node selection constraintsMetadata
labels– Custom labels applied to podsannotations– Custom annotations applied to podsNew fields added to
InitContainerConfig:resources– CPU/memory requests and limits for init containersecurityContext– Container-level security context for init containerDesign Decisions
initContainer.securityContextis not specified, it inherits from the main container'ssecurityContextfor consistent security policies