-
Notifications
You must be signed in to change notification settings - Fork 393
feat(helm): add secretRef support for grafana-mcp #1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,8 +48,10 @@ spec: | |
| envFrom: | ||
| - configMapRef: | ||
| name: {{ include "grafana-mcp.fullname" . }} | ||
| {{- if or .Values.grafana.secretRef .Values.grafana.serviceAccountToken .Values.grafana.apiKey }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this always true? If one of these isn't true than the config is invalid anyway? |
||
| - secretRef: | ||
| name: {{ include "grafana-mcp.fullname" . }} | ||
| name: {{ .Values.grafana.secretRef | default (include "grafana-mcp.fullname" .) | quote }} | ||
| {{- end }} | ||
| ports: | ||
| - name: http | ||
| containerPort: {{ .Values.service.port }} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| {{- if or .Values.grafana.serviceAccountToken .Values.grafana.apiKey }} | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: {{ include "grafana-mcp.fullname" . }} | ||
| name: {{ .Values.grafana.secretRef | default (include "grafana-mcp.fullname" .) | quote }} | ||
|
||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "grafana-mcp.labels" . | nindent 4 }} | ||
|
|
@@ -13,3 +14,4 @@ data: | |
| {{- if and .Values.grafana.apiKey (not .Values.grafana.serviceAccountToken) }} | ||
| GRAFANA_API_KEY: {{ .Values.grafana.apiKey | b64enc }} | ||
| {{- end }} | ||
| {{- end }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,7 +3,8 @@ replicas: 1 | |||||
| grafana: | ||||||
| url: "grafana.kagent:3000/api" | ||||||
| serviceAccountToken: "" | ||||||
| apiKey: "" # Deprecated - use serviceAccountToken instead. | ||||||
| # apiKey: "" # Deprecated - use serviceAccountToken instead. | ||||||
|
||||||
| # apiKey: "" # Deprecated - use serviceAccountToken instead. | |
| apiKey: "" # Deprecated - use serviceAccountToken instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I follow the pattern of modelconfig-secret, e.x. Values.providers.openAI.apiKey.
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The secretRef field should be uncommented with an empty default value to make it discoverable as a supported configuration option, consistent with how serviceAccountToken is defined on line 5.
| # secretRef: "" # Name of Secret to reference (contains GRAFANA_SERVICE_ACCOUNT_TOKEN or GRAFANA_API_KEY) | |
| secretRef: "" # Name of Secret to reference (contains GRAFANA_SERVICE_ACCOUNT_TOKEN or GRAFANA_API_KEY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I follow the pattern of modelconfig-secret, e.x. Values.providers.openAI.apiKey.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These fields should be uncommented with empty default values for consistency with
serviceAccountTokenon line 352 and to maintain backward compatibility forapiKey.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I follow the pattern of modelconfig-secret, e.x.
Values.providers.openAI.apiKey.