Skip to content

Conversation

@drewhemm
Copy link

@drewhemm drewhemm commented Dec 20, 2025

This PR attempts to address #98

It maintains backwards compatibility for specifying env vars using simple strings (value), but also adds the ability to specify object values, which unlock the ability to use valueFrom, to source individual env vars from secrets, configmaps and the Downward API.

Example:

---
apiVersion: kagent.dev/v1alpha1
kind: MCPServer
metadata:
  name: my-mcp-server
  namespace: my-mcp-namespace
spec:
  deployment:
    env:
      FOO: bar
      VAR_FROM_SECRET:
        valueFrom:
          secretKeyRef:
            name: secret-name
            key: secret-key
      MY_CPU_REQUEST:
        valueFrom:
          resourceFieldRef:
            containerName: test-container
            resource: requests.cpu

…rCfg type

Signed-off-by: Andrew Hemming <andrew@footprintit.net>
@drewhemm drewhemm force-pushed the mcp-server-env-enhancement branch from 17ec232 to 061fceb Compare December 20, 2025 19:22
Signed-off-by: Andrew Hemming <andrew@footprintit.net>
…ring and object formats

Signed-off-by: Andrew Hemming <andrew@footprintit.net>
@drewhemm drewhemm force-pushed the mcp-server-env-enhancement branch from 77027a3 to c76e8aa Compare December 20, 2025 22:03
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