Skip to content

Commit fcc82bf

Browse files
popagruiapopagruiacrivetimihai
authored
Chart plugin conf (#1185)
* Initial version Signed-off-by: popagruia <[email protected]> * Fixed dependency of plugins enable Signed-off-by: popagruia <[email protected]> * Changed schema/defaults Signed-off-by: popagruia <[email protected]> * Fixed plugin path Signed-off-by: popagruia <[email protected]> * bring files from main Signed-off-by: popagruia <[email protected]> * Fixed rebase Signed-off-by: popagruia <[email protected]> * Remove uwanted default value Signed-off-by: popagruia <[email protected]> * fix: improve plugin config chart implementation - Add newline at end of configmap-gateway-plugin.yaml - Improve schema descriptions for pluginConfig - Restore ingress annotations field (as empty object) - Fix volumeMounts indentation in deployment - Ensure backward compatibility with existing deployments Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: popagruia <[email protected]> Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: popagruia <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
1 parent 214aa56 commit fcc82bf

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.mcpContextForge.pluginConfig.enabled}}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "mcp-stack.fullname" . }}-gateway-plugins
6+
labels:
7+
{{- include "mcp-stack.labels" . | nindent 4 }}
8+
app.kubernetes.io/component: gateway
9+
data:
10+
config.yaml: |
11+
{{- .Values.mcpContextForge.pluginConfig.plugins | nindent 4 }}
12+
{{- end }}

charts/mcp-stack/templates/deployment-mcpgateway.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,3 +152,20 @@ spec:
152152
# Resource requests / limits
153153
resources:
154154
{{- toYaml .Values.mcpContextForge.resources | nindent 12 }}
155+
156+
{{- /* Plugins enabled need the plugins configuration */}}
157+
{{- if .Values.mcpContextForge.pluginConfig.enabled }}
158+
volumeMounts:
159+
- name: plugin-config-volume
160+
mountPath: /app/{{ .Values.mcpContextForge.config.PLUGIN_CONFIG_FILE }}
161+
subPath: config.yaml
162+
{{- end }}
163+
{{- if .Values.mcpContextForge.pluginConfig.enabled }}
164+
volumes:
165+
- name: plugin-config-volume
166+
configMap:
167+
name: {{ include "mcp-stack.fullname" . }}-gateway-plugins
168+
items:
169+
- key: config.yaml
170+
path: config.yaml
171+
{{- end }}

charts/mcp-stack/values.schema.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@
251251
},
252252
"additionalProperties": false
253253
},
254+
255+
"pluginConfig": {
256+
"type": "object",
257+
"description": "Plugin configuration via ConfigMap",
258+
"properties": {
259+
"enabled": {
260+
"type": "boolean",
261+
"description": "Enable plugin configuration loading via ConfigMap",
262+
"default": false
263+
},
264+
"plugins": {
265+
"type": "string",
266+
"description": "Plugin configuration file contents (YAML)"
267+
}
268+
}
269+
},
254270
"env": {
255271
"type": "object",
256272
"description": "Environment configuration",

charts/mcp-stack/values.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ global:
1111
# MCP CONTEXT-FORGE (Gateway / API tier)
1212
########################################################################
1313
mcpContextForge:
14+
# --- Specific plugin file ----#
15+
pluginConfig:
16+
enabled: false
17+
plugins: |
18+
# plugin file
19+
1420
replicaCount: 2 # horizontal scaling for the gateway
1521

1622
# --- HORIZONTAL POD AUTOSCALER --------------------------------------
@@ -93,9 +99,9 @@ mcpContextForge:
9399
host: gateway.local # CHANGE to your FQDN (e.g. api.example.com)
94100
path: /
95101
pathType: Prefix
96-
annotations:
97-
nginx.ingress.kubernetes.io/rewrite-target: /
98-
# cert-manager.io/cluster-issuer: letsencrypt-prod # Uncomment to enable automatic TLS cert generation
102+
annotations: {} # Custom ingress annotations (optional)
103+
# nginx.ingress.kubernetes.io/rewrite-target: /
104+
# cert-manager.io/cluster-issuer: letsencrypt-prod
99105
tls:
100106
enabled: false # Set to true to enable TLS
101107
secretName: "" # Name of the TLS secret (auto-generated if empty)

0 commit comments

Comments
 (0)